interface
CSSFontFeatureValuesRule — CSS reference
Represents a named font-family feature-value rule. The rule groups human-readable aliases for OpenType feature indices; reading it does not demonstrate actual glyph substitution.
Formal Syntax & Structure
css syntaxcss
sheet.cssRules[index]Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSSFontFeatureValuesRule</title><style>body{margin:0;font:16px system-ui}#a{box-sizing:content-box;width:120px;height:60px;padding:8px;border:3px solid #475569;overflow:auto}#output{white-space:pre-wrap}
</style><body><div id="a">Example</div><pre id="output" aria-live="polite"></pre><script>const a=document.getElementById("a"); window.demoResult=(async()=>{const sheet=new CSSStyleSheet();sheet.replaceSync("@font-feature-values Example{@styleset{alternate:2}}");const r=sheet.cssRules[0];return [r.constructor.name,r.fontFamily];})();window.demoResult.then(v=>document.getElementById("output").textContent=JSON.stringify(v),e=>document.getElementById("output").textContent=String(e));</script></body></html>