Abakada: Back to Basics > Language References > CSS Properties > At-Rules > @fontFeatureValues
Enables authors to use a common name in the font-variant-alternates property.
@font-feature-values family-name {
... declaration-rule-list ...
}
Parameter |
Description |
Valid Values |
family-name |
Specifies the name of a font family. |
Locally-installed font or generic font choice. |
The @font-feature-values at-rule lets an author assign, for each font face, a human-friendly name to specific feature indexes, for features activated differently in OpenType fonts.
Several possible values for font-variant-alternates define multiple possible glyph variants, each associated with a numeric index.
These numeric indexes are distinct to each face, for example swsh1 or salt1, etc. Thus, specifying the index in font-feature-settings requires that the author know exactly which font will be used on an element.
The @font-feature-values rule uses friendly names for these indexes, enabling authors to easily turn on font features.
NOTE: This section is currently under major reconstruction. Please bear with whatever inconvenience you may encounter; we hope to complete the job at the soonest possible time.