CSSFontFeatureValuesMap: size-Eigenschaft
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Die schreibgeschützte size-Eigenschaft des CSSFontFeatureValuesMap-Interfaces gibt eine positive ganze Zahl zurück, die die Größe des CSSFontFeatureValuesMap-Objekts enthält.
Wert
Eine positive ganze Zahl.
Beispiele
>Grundlegende Verwendung
Das folgende Beispiel gibt eine Ganzzahl der Anzahl der Deklarationen innerhalb des @swash-Feature-Blocks aus. Dieses Beispiel verwendet @swash, funktioniert jedoch auch mit anderen Feature-Wert-Blöcken.
CSS
css
@font-feature-values "MonteCarlo" {
@swash {
swishy: 1;
swashy: 2;
}
}
JavaScript
js
// get the rules
const myRule = document.styleSheets[0].cssRules[0];
console.log(myRule.swash.size); // logs 2
Spezifikationen
| Specification |
|---|
| CSS Fonts Module Level 4> # cssfontfeaturevaluesmap> |