font-variant-numeric

The font-variant-numeric CSS property specifies control over numerical forms.

Syntax

CSS

font-variant-numeric: value;

JS

object.style.fontVariantNumeric = "value";

Values

<'font-variant-numeric'> = normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]
normal

None of the features are enabled.

<numeric-figure-values> = [ lining-nums | oldstyle-nums ]
lining-nums

Enables display of lining numerals.

oldstyle-nums

Enables display of old-style numerals.

<numeric-spacing-values> = [ proportional-nums | tabular-nums ]
proportional-nums

Enables display of proportional numerals.

tabular-nums

Enables display of tabular numerals.

<numeric-fraction-values> = [ diagonal-fractions | stacked-fractions ]
diagonal-fractions

Enables display of lining diagonal fractions.

stacked-fractions

Enables display of lining stacked fractions.

ordinal

Enables display of letter forms used with ordinal numbers.

slashed-zero

Enables display of slashed zeros.

Initial

normal

Examples

numeric-figure-values | lining-nums

numeric-figure-values | oldstyle-nums

numeric-fraction-values | diagonal-fractions

numeric-fraction-values | stacked-fractions

numeric-spacing-values | proportional-nums

numeric-spacing-values | tabular-nums

normal

ordinal

slashed-zero

JS

World Wide Web Consortium (W3C)

Home Menu