CSS font-variant Descriptor

The CSS font-variant descriptor is used with the @font-face at-rule to define the inital settings for the font-variant property when the @font-face at-rule is rendered.

The font-variant descriptor is not to be confused with the font-variant property. The font-variantdescriptor does not affect font selection. It is used solely with the @font-face at-rule to define the initial values for the font-variantproperty, which can then be used elsewhere in the style sheet to change these values.

Official Syntax

The font-variant descriptor has the following syntax (which is the same syntax that the font-variant property uses):

The initial value is normal.

These values are explained below. The OpenType feature tag/s are included where applicable.

For more information about these values, visit the link/s within each description.

normal

Resets all subproperties to their initial value.

none

Sets font-variant-ligatures to none and resets all other font feature properties to their initial value.

Ligatures

These are the possible values for the font-variant-ligatures property. They are grouped under common ligatures, discretionary ligatures, historical ligatures, and contextual alternates.

common-lig-values

Specifies whether common ligatures (OpenType features: liga, clig) are enabled or not. This can be one of the following values:

common-ligatures

Enables display of common ligatures. For OpenType fonts, common ligatures are enabled by default.

no-common-ligatures

Disables display of common ligatures.

discretionary-lig-values

Specifies whether discretionary ligatures (OpenType feature: dlig) are enabled or not. This can be one of the following values:

discretionary-ligatures

Enables display of discretionary ligatures. Which ligatures are discretionary or optional is decided by the type designer, so authors will need to refer to the documentation of a given font to understand which ligatures are considered discretionary.

no-discretionary-ligatures

Disables display of discretionary ligatures.

historical-lig-values

Specifies whether historical ligatures (OpenType feature: hlig) are enabled or not. This can be one of the following values:

historical-ligatures

Enables display of historical ligatures.

no-historical-ligatures

Disables display of historical ligatures.

contextual-alt-values

Specifies whether contextual alternates are enabled or not (OpenType feature: hlig). This can be one of the following values:

Caps

Specifies that the font is rendered in small-caps (OpenType feature: smcp). Small caps typically appear as uppercase letters but in the size of lower case letters.

all-small-caps

Enables display of small capitals for both upper and lowercase letters (OpenType features: c2sc, smcp).

With normal small caps, any uppercase character is rendered at full uppercase size, while lowercase characters are rendered smaller. However, when the all-small-caps keyword is used, those uppercase characters are rendered at the smaller size.

petite-caps

Enables display of petite capitals (OpenType feature: pcap).

If the font doesn't support petite capitals, the property behaves as though small-caps had been specified instead.

Titling capitals are a variant of uppercase designed for heading and titles. The stroke width is reduced for use at larger point sizes where the stroke weight used in smaller text sizes would be too heavy.

If this is used on a font that doesn't support this feature, the property has no visible effect.