at-rule
@character variant — CSS reference
Maps the first integer to a character-variant feature index and the optional second to its value. The nested rule associates an author-friendly name with OpenType feature indexes (cv02). The chosen font must actually contain those features. Demo is an illustrative family name with a serif fallback; glyph substitution is not assumed.
Formal Syntax & Structure
css syntaxcss
@font-feature-values Demo { @character-variant { special: 2 3; } }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>@character-variant</title><style>body{margin:8px;font:16px/20px sans-serif;color:black;background:white}@font-feature-values Demo { @character-variant { special: 2 3; } } #a{font-family:Demo,serif;font-variant-alternates:character-variant(special)}</style><body><p id="a">Example text</p></body></html>