CSS Portal

CSS font-variant-emoji Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The font-variant-emoji property controls how user agents choose and present emoji glyphs and emoji-capable fonts for characters in the text stream. It influences whether characters that have both text and emoji presentations are rendered using the color/graphical emoji glyphs provided by emoji-capable fonts or with the text-style glyphs from a standard text font, and it can affect how multi-codepoint emoji sequences (such as those using zero‑width joiners) are resolved to a single unified glyph. In practice this property lets authors express a preference for emoji-style rendering versus text-style rendering without changing the underlying character data; the engine still follows Unicode presentation selectors and font matching rules but takes the declared preference into account when picking a glyph.

This preference works together with font selection and fallback: the engine will consider the declared emoji preference when matching available fonts in the cascade and when deciding whether to substitute a color emoji font from the system or a text font from the page. For consistent results you typically pair the emoji preference with an explicit font stack so that emoji-capable fonts are available when desired; see font-family for how font selection influences which glyphs are used. Because emoji presentation often relies on specialized formats (color bitmap/bitmap-with-vector-outline, COLR/CPAL, or SVG-in-OpenType), the property is effectively a hint to the renderer about choosing those fonts and glyphs rather than an instruction that directly changes glyph outlines.

The way the property interacts with other typographic features is complementary: it does not replace OpenType feature control or other font-level settings but can change which font and glyph set those features apply to. For fine-grained typographic control you would still use mechanisms such as font-feature-settings and the broader family of font-variant controls like font-variant to adjust ligatures, numeric styles, and similar features after the emoji-capable font has been selected. In other words, font-variant-emoji helps determine the visual style and source font for emoji characters, and then the renderer applies the usual font shaping and OpenType feature pipeline to those chosen glyphs when applicable.

In practical terms, authors use this property to get consistent visual behavior across platforms (for example, to prefer monochrome text-style glyphs for inline emoji in a dense typographic layout, or to prefer color emoji for expressive messaging). Considerations include layout and metrics — because emoji glyphs can have different metrics than text glyphs, switching presentation can affect line-height, alignment, and line-breaking — and accessibility: choosing text-style presentation in contexts where emoji could be confusing to assistive technologies may help, but you should still ensure semantic meaning is conveyed in text. Finally, because user agents implement emoji rendering using different font formats and composition rules, it’s important to test your chosen presentation in representative environments and with common multi-codepoint emoji sequences (ZWJ sequences, skin-tone modifiers, variation selectors) to confirm the intended result.

Definition

Initial value
normal
Applies to
all elements and text. It also applies to ::first-letter and ::first-line.
Inherited
yes
Computed value
as specified
Animatable
yes
JavaScript syntax
object.style.fontVariantEmoji

Syntax

font-variant-emoji: normal | text | emoji | unicode

Values

  • normalAllows a browser to choose how to display the emoji. This often follows the operating system setting.
  • textRenders the emoji as if it were using the unicode text variation selector (U+FE0E).
  • emojiRenders the emoji as if it were using the unicode emoji variation selector (U+FE0F).
  • unicodeRenders the emoji in accordance with the Emoji presentation properties. If the U+FE0E or U+FE0F variation selector is present, then it will override this value setting.

Example

<div class="example">
<h2>font-variant-emoji - presentation examples</h2>
<div class="row">
<div class="label">Emoji presentation</div>
<div class="glyph variant-emoji">☀️</div>
</div>
<div class="row">
<div class="label">Text presentation</div>
<div class="glyph variant-text">☀️</div>
</div>
<div class="row">
<div class="label">Default (browser)</div>
<div class="glyph variant-default">☀️</div>
</div>
</div>
.example {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  max-width: 640px;
  margin: 24px;
  color: #111;
}

h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.label {
  width: 160px;
  color: #333;
  font-size: 14px;
}

.glyph {
  font-size: 64px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8f9fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
}

.glyph.variant-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", serif;
  font-variant-emoji: emoji;
}

.glyph.variant-text {
  font-family: Georgia, "Times New Roman", serif;
  font-variant-emoji: text;
}

.glyph.variant-default {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", serif;
  /* browser default behavior */
}

Browser Support

The following information will show you the current browser support for the CSS font-variant-emoji property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is not supported by modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!