Dieser Inhalt wurde automatisch aus dem Englischen übersetzt, und kann Fehler enthalten.Erfahre mehr über dieses Experiment.
CSSFontFeatureValuesMap: clear() Methode
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Dieclear()-Methode der SchnittstelleCSSFontFeatureValuesMap entfernt alle Deklarationen in derCSSFontFeatureValuesMap.
In diesem Artikel
Syntax
js
clear()Parameter
Keine.
Rückgabewert
Keine (undefined).
Beispiele
>Grundlegende Verwendung
Das folgende Beispiel entfernt alle Deklarationen innerhalb des@swash-Funktionsblocks. Dieses Beispiel verwendet@swash, funktioniert aber auch mit anderenFunktionswertblöcken.
CSS
css
@font-feature-values "MonteCarlo" { @swash { swishy: 1; swashy: 2; }}JavaScript
js
// get the rulesconst myRule = document.styleSheets[0].cssRules[0];console.log(myRule.swash.size); // logs 2myRule.swash.clear();console.log(myRule.swash.size); // logs 0Spezifikationen
| Specification |
|---|
| CSS Fonts Module Level 4> # cssfontfeaturevaluesmap> |