We use cookies to improve your experience. Learn more in our Privacy policy.
font-variant
The font-variant CSS shorthand property allows you to set all the font variants for a font.
Initial value | normal |
Applies to | all elements. It also applies to ::first-letter and ::first-line. |
Syntax
font-variant: common-ligatures tabular-nums;
Values
Specifies a normal font face; each of the longhand properties has an initial value of normal. Longhand properties of font-variant are: font-variant-caps, font-variant-numeric, font-variant-alternates, font-variant-ligatures, and font-variant-east-asian.
Sets the value of the font-variant-ligatures to none and the values of the other longhand property as normal, their initial value.
Specifies the keywords related to the font-variant-ligatures longhand property. The possible values are: common-ligatures, no-common-ligatures, discretionary-ligatures, no-discretionary-ligatures, historical-ligatures, no-historical-ligatures, contextual, and no-contextual.
Specifies the keywords and functions related to the font-variant-alternates longhand property.
Specifies the keywords and functions related to the font-variant-caps longhand property.
Specifies the keywords related to the font-variant-numeric longhand property. The possible values are: lining-nums, oldstyle-nums, proportional-nums, tabular-nums, diagonal-fractions, stacked-fractions, ordinal, and slashed-zero.
Specifies the keywords related to the font-variant-east-asian longhand property. The possible values are: jis78, jis83, jis90, jis04, simplified, traditional, full-width, proportional-width, ruby.
Browser support
font-variant | chrome1 | edge12 | firefox1 | ie4 | opera3.5 | safari1 |
css_fonts_shorthand | chrome52 | edge79 | firefox34 | ie | opera39 | safari9.1 |
greek_accented_characters | chrome | edge | firefox | ie | opera | safari |
turkic_is | chrome31 | edge12 | firefox14 | ie4 | opera18 | safari8 |
uppercase_eszett | chrome | edge | firefox | ie | opera | safari |