27 properties, 10 at-rules, 1 function, 2 types defined by this
specification, 31 of them known to at least one browser
(the others are badged Not in any browser yet).
<section id="default-example"> <q id="example-element"> Prejudices, it is well known, are most difficult to eradicate from the heart whose soil has never been loosened or fertilized by education: they grow there, firm as weeds among stones. </q></section>
MDN The @font-palette-valuesdescriptorfont-family is used to specify which font-family palette values are to be applied to. This need to match exactly the values used when setting the CSS font-family.
PropertyBaseline: widely availablesince September 2018
MDN The font-feature-settingsCSS descriptor allows you to define the initial settings to use for the font defined by the @font-face at-rule. You can further use this descriptor to control typographic font features such as ligatures, small caps, and swashes, for the font defined by @font-face. The values for this descriptor are the same as the font-feature-settings property, except for the global keyword values.
MDN The font-kerningCSS property sets the use of the kerning information stored in a font.
Live previewExample from MDN
section { font-family: serif;}
<section class="default-example" id="default-example"> <div class="transition-all" id="example-element"> "We took Tracy to see 'THE WATERFALL' in W. Virginia." </div></section>
Syntax
auto | normal | none
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
all elements and text
Inherited
yes
Percentages
n/a
Computed value
as specified
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting font-kerning
Chrome
33
Edge
79
Firefox
32
Safari
9
Chrome Android
33
Safari iOS
9
First version with support, from MDN browser-compat-data.
<section id="default-example"> <div id="example-element"> <h2>Chapter 3</h2> <p> On this particular Thursday, something was moving quietly through the ionosphere many miles above the surface of the planet; several somethings in fact, several dozen huge yellow chunky slablike somethings, huge as office blocks, silent as birds. </p> </div></section>
Syntax
auto | none
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
all elements and text
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting font-optical-sizing
Chrome
79
Edge
17
Firefox
62
Safari
13.1
Chrome Android
79
Safari iOS
13.4
First version with support, from MDN browser-compat-data.
MDN The font-paletteCSS property allows specifying one of the many palettes contained in a color font that a user agent may use for the font. Users can also override the values in a palette or create a new palette by using the @font-palette-values at-rule.
Live previewExample from MDN
@import "https://fonts.googleapis.com/css2?family=Nabla&display=swap";@font-palette-values --blue-nabla { font-family: "Nabla"; base-palette: 2; /* this is Nabla's blue palette */}@font-palette-values --grey-nabla { font-family: "Nabla"; base-palette: 3; /* this is Nabla's grey palette */}@keyframes animate-palette { from { font-palette: --grey-nabla; } to { font-palette: --blue-nabla; }}p { font-family: "Nabla", fantasy; font-size: 5rem; margin: 0; text-align: center; animation: animate-palette 4s infinite alternate linear;}
<p>color-palette<br />animation</p>
Syntax
normal | light | dark | <palette-identifier> | <palette-mix()>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
normal
Applies to
all elements and text
Inherited
yes
Percentages
N/a
Computed value
specified keyword, identifier or <palette-mix()> function. <palette-mix()> must be simplified to a single keyword or identifier if resulting palette is equivalent.
Canonical order
per grammar
Animation type
by computed value
Browser support
First browser version supporting font-palette
Chrome
101
Edge
101
Firefox
107
Safari
15.4
Chrome Android
101
Safari iOS
15.4
First version with support, from MDN browser-compat-data.
MDN The font-sizeCSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative <length> units, such as em, ex, and so forth.
Live previewExample from MDN
<section id="default-example"> <p id="example-element"> London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill. </p></section>
Syntax
<absolute-size> | <relative-size> | <length-percentage [0,∞]> | math
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
medium
Applies to
all elements and text
Inherited
yes
Percentages
refer to parent element’s font size
Computed value
an absolute length
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting font-size
Chrome
1
Edge
12
Firefox
1
Safari
1
Chrome Android
18
Safari iOS
1
First version with support, from MDN browser-compat-data.
MDN The font-size-adjustCSS property adjusts the size of a font to match a chosen font metric, such as the height of lowercase letters, to a specified proportion of the font-size. This property is intended for adjusting fallback fonts to have similar metrics as the first-choice font.
<p class="verdana"> A: This text uses the Verdana font (14px), which has relatively large lowercase letters.</p><p class="times"> B: This text uses the Times font (14px), which is hard to read in small sizes.</p><p class="times adj-times-ex-height"> C: This text in 14px Times font is adjusted to the same aspect value as the Verdana font, so lowercase letters are normalized across the two fonts.</p><p class="times adj-times-cap-height"> D: This text in 14px Times font is adjusted to the same cap-height to font size ratio as the Verdana font, so uppercase letters are normalized across the two fonts.</p>
MDN The font-synthesisCSSshorthand property lets you specify whether or not the browser may synthesize the bold, italic, small-caps, and/or subscript and superscript typefaces when they are missing in the specified font-family.
MDN The font-synthesis-positionCSS property lets you specify whether or not a browser may synthesize the subscript and superscript "position" typefaces when they are missing in a font family, while using font-variant-position to set the positions.
<p> These are the default position <span class="super">superscript</span>, position <span class="sub">subscript</span>, <strong>bold</strong> and <em>oblique</em> typefaces.</p><p class="no-syn"> The positions <span class="super">superscript</span> and <span class="sub">subscript</span> typeface is turned off here but not the <strong>bold</strong> and <em>oblique</em> typefaces (on browsers that support <code>font-synthesis-position</code>).</p>
Syntax
auto | none
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
all elements and text
Inherited
yes
Percentages
N/A
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting font-synthesis-position
Chrome
No
Edge
No
Firefox
118
Safari
No
Chrome Android
No
Safari iOS
No
First version with support, from MDN browser-compat-data.
MDN The font-synthesis-small-capsCSS property lets you specify whether or not the browser may synthesize small-caps typeface when it is missing in a font family. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters.
<p class="english"> These are the default <span class="small-caps">small-caps</span>, <strong>bold</strong>, and <em>oblique</em> typefaces.</p><p class="english no-syn"> The <span class="small-caps">small-caps</span> typeface is turned off here but not the <strong>bold</strong> and <em>oblique</em> typefaces.</p>
Syntax
auto | none
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
all elements and text
Inherited
yes
Percentages
N/A
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting font-synthesis-small-caps
Chrome
97
Edge
97
Firefox
111
Safari
16.4
Chrome Android
97
Safari iOS
16.4
First version with support, from MDN browser-compat-data.
MDN The font-synthesis-styleCSS property lets you specify whether or not the browser may synthesize the oblique typeface when it is missing in a font family.
<p class="english"> This is the default <em>oblique typeface</em> and <strong>bold typeface</strong>.</p><p class="english no-syn"> The <em>oblique typeface</em> is turned off here but not the <strong>bold typeface</strong>.</p>
Syntax
auto | none | oblique-only
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
all elements and text
Inherited
yes
Percentages
N/A
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting font-synthesis-style
Chrome
97
Edge
97
Firefox
111
Safari
16.4
Chrome Android
97
Safari iOS
16.4
First version with support, from MDN browser-compat-data.
MDN The font-synthesis-weightCSS property lets you specify whether or not the browser may synthesize the bold typeface when it is missing in a font family.
<p class="english"> This is the default <strong>bold typeface</strong> and <em>oblique typeface</em>.</p><p class="english no-syn"> The <strong>bold typeface</strong> is turned off here but not the <em>oblique typeface</em>.</p>
Syntax
auto | none
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
all elements and text
Inherited
yes
Percentages
N/A
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting font-synthesis-weight
Chrome
97
Edge
97
Firefox
111
Safari
16.4
Chrome Android
97
Safari iOS
16.4
First version with support, from MDN browser-compat-data.
MDN The font-variant-alternatesCSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in @font-feature-values.
<p class="no-support"> Your Browser does not support <code>font-variant-emoji</code>. This image shows how it is rendered with support.</p><img class="no-support" src="./font-variant-emoji-example.jpg" alt="a telephone emoji show as text, black and white next to a telephone emoji shown as emoji full color and graphical representation" /><section class="emojis"> <div class="emoji"> <h2>text presentation</h2> <div class="text-presentation">☎</div> </div> <div class="emoji"> <h2>emoji presentation</h2> <div class="emoji-presentation">☎</div> </div></section>
Syntax
normal | text | emoji | unicode
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
normal
Applies to
all elements and text
Inherited
yes
Percentages
N/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting font-variant-emoji
Chrome
131
Edge
131
Firefox
141
Safari
Preview
Chrome Android
131
Safari iOS
17.5 (flag)
First version with support, from MDN browser-compat-data.
MDN The font-variant-ligaturesCSS property controls which ligatures and contextual forms are used in the textual content of the elements it applies to. This leads to more harmonized forms in the resulting text.
PropertyBaseline: widely availablesince March 2021
MDN The font-variation-settingsCSS descriptor allows authors to specify low-level OpenType or TrueType font variations in the @font-face at-rule. The values for this descriptor are the same as the font-variation-settings property, except for the global keyword values.
Syntax
normal | [ <opentype-tag> <number> ]#
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
normal
Applies to
all elements and text
Inherited
yes
Percentages
n/a
Computed value
the keyword normal or a list, each item a string paired with a number
Canonical order
per grammar
Animation type
see prose
Browser support
First browser version supporting font-variation-settings
Chrome
140
Edge
140
Firefox
62
Safari
No
Chrome Android
140
Safari iOS
No
First version with support, from MDN browser-compat-data.
PropertyBaseline: widely availablesince January 2018
MDN The font-weightCSS@font-face descriptor enables authors to specify a single font weight, or a range of font weights, for the font specified in a @font-face at-rule. This is then used by the browser to select the appropriate font when a CSS rule sets a desired font weight.
MDN The @font-faceCSSat-rule specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on the user's own computer.
Live previewExample from MDN
@font-face { font-family: "Bitstream Vera Serif Bold"; src: url("https://mdn.github.io/shared-assets/fonts/FiraSans-Regular.woff2");}body { font-family: "Bitstream Vera Serif Bold", serif;}
<body> This is Bitstream Vera Serif Bold.</body>
Syntax
@font-face { <declaration-list> }
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Browser support
First browser version supporting @font-face
Chrome
1
Edge
12
Firefox
3.5
Safari
3.1
Chrome Android
18
Safari iOS
2
First version with support, from MDN browser-compat-data.
MDN The @font-feature-valuesCSSat-rule lets you use a common name in the font-variant-alternates property for features activated differently in OpenType. This can help simplify your CSS when using multiple fonts.
Spec The @font-palette-values rule defines a color palette and associates that color palette with a specific font. This allows a web author to select arbitrary <color>s to use inside a color font rather than being limited to the preexisting palettes inside font files.
MDN The @font-palette-valuesCSSat-rule allows you to customize the default values of font-palette created by the font-maker.
Spec With the palette-mix() function defined as follows:
MDN The palette-mix()CSSfunction can be used to create a new font-palette value by blending together two font-palette values by specified percentages and color interpolation methods.
MDN The <relative-size>CSSdata type describes relative size keywords. The <relative-size> keywords define a size relative to the computed size of the parent element. This data type is used in the font shorthand and font-size properties.
Live previewExample from MDN
li { margin-bottom: 0.3em;}.smaller { font-size: smaller;}.larger { font-size: larger;}
<ul> <li class="smaller">font-size: smaller;</li> <li>font-size is not specified</li> <li class="larger">font-size: larger;</li></ul>
Syntax
[ larger | smaller ]
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.