@font-feature-values "MonteCarlo" {
@swash {
swishy: 1;
swashy: 2;
}
}CSSFontFeatureValuesMap: values() method / notebook
CSSFontFeatureValuesMap: values() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
// get the rules
const myRule = document.styleSheets[0].cssRules[0];
// get the values of swash
const swashValues = myRule.swash.values();
console.log(swashValues.next().value); // logs [1]
console.log(swashValues.next().value); // logs [2]