CSSFontFeatureValuesRule: styleset-Eigenschaft
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Die schreibgeschützte styleset-Eigenschaft des CSSFontFeatureValuesRule-Interfaces enthält ein CSSFontFeatureValuesMap-Objekt, das die user-defined-ident und den feature index für eine variable Schriftart darstellt, die styleset() unterstützt.
Wert
Ein CSSFontFeatureValuesMap-Objekt.
Obwohl die styleset-Eigenschaft an sich schreibgeschützt ist, da Sie das CSSFontFeatureValuesMap-Objekt nicht ersetzen können, können Sie dennoch direkt der styleset-Eigenschaft etwas zuweisen. Sie können auch die Werte des styleset mit den Instanzmethoden von CSSFontFeatureValuesMap ändern.
Beispiel
>Grundlegende Verwendung
CSS
css
@font-feature-values "MonteCarlo" {
@styleset {
my-stylesets: 1;
}
}
JavaScript
js
// look for the first stylesheet and the first cssRule in that sheet
const myRule = document.styleSheets[0].cssRules[0];
// check
if (myRule instanceof CSSFontFeatureValuesRule && myRule.styleset.size) {
// do something with the styleset
}
Spezifikationen
| Specification |
|---|
| CSS Fonts Module Level 4> # dom-cssfontfeaturevaluesrule-styleset> |
Browser-Kompatibilität
Siehe auch
@stylesetstyleset()funktionale NotationCSSFontFeatureValuesMap