Support0

CSS font-smooth playground

Explore font-smooth modes, compare smoothing requests, and copy non-standard CSS with its syntax variants.

Ask AI

CSS font-smooth playground

Response generated with openai/gpt-5.4-nano. AI can make mistakes. Always review the result.

BaselineLab compares font-smooth with large, high-contrast text. The result depends on the operating system, display and browser engine.

HTML
<p class="font-smooth-sample">
  BaselineLab compares font-smooth with large, high-contrast text.
  The result depends on the operating system, display and browser engine.
</p>
Tailwind CSS
Examples for Tailwind CSS 4.3 with the default theme. Custom values keep arbitrary classes when there is no equivalent utility. Changing the theme can change utility values.
<p class="max-w-xl text-4xl font-bold leading-tight [font-smooth:always] antialiased">
  BaselineLab compares font-smooth with large, high-contrast text.
  The result depends on the operating system, display and browser engine.
</p>
CSS
.font-smooth-sample {
  max-inline-size: 36rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  font-smooth: always;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

Educational guide to font-smooth

Compare smoothing without promising uniformity

Distinguish a non-standard property from its prefixed variants. Try a local adjustment, keep the browser’s choice as a reference, and assess reading in the actual environment.

Mental model

Smoothing affects how glyph edges are drawn. It may change their appearance, but it does not replace choosing a font, size, or weight. font-smooth and its prefixed variants do not provide a standard way to equalize text across platforms.

  1. Font and layout

    Family, size, and weight determine the glyphs to render. Keep these values constant when comparing smoothing.

  2. Engine and system

    The browser and operating system decide how to rasterize. Accepting a CSS value does not prove that the result changes.

  3. Display and observation

    Density, scaling, and zoom affect what you can perceive. A resized screenshot does not necessarily reproduce reading on the device.

Static diagram of text renderingThe declaration is only one input to the process. This diagram does not simulate pixels or certify which method your display uses.

Three names, different vocabularies

Do not add prefixes while automatically keeping the same value. The related names have no universal mapping and do not guarantee identical rendering.

font-smooth appears with historical values such as auto, always, and never. It is not part of a current standard; do not treat it as an interoperable API or a fallback for the prefixed variants.

-webkit-font-smoothing uses auto, none, antialiased, and subpixel-antialiased. auto lets the browser decide; antialiased requests grayscale smoothing and none requests disabling it. The name subpixel-antialiased does not guarantee that the method exists or is used on your system.

-moz-osx-font-smoothing uses auto and grayscale, with an effect documented on macOS. grayscale requests grayscale smoothing. It has no direct equivalent for every WebKit mode: do not invent antialiased or none values with this prefix.

The playground groups always with antialiased/grayscale and never with none as educational configurations. The subpixel-antialiased output keeps auto in the other declarations. These groupings do not turn the three names into one common standard property.

A local trial with an explicit reference

Compare the same text, font, size, weight, and background. The first row declares auto to avoid inheriting a site adjustment; the second applies only values whose syntax is accepted. Both rows may look identical.

auto versus a request for grayscale smoothing

Reference · auto

Readable text: Aa Ee 0123456789.

Local trial · antialiased / grayscale

Readable text: Aa Ee 0123456789.

A native example with two rendering requests and no simulation. Both rows keep font-size: 1.5rem and font-weight: 400. Any visible difference belongs to this environment; no visible difference does not identify its cause either.
auto versus a request for grayscale smoothing
<div class="font-smooth-guide-trial" lang="en">
  <div>
    <p class="label">Reference · auto</p>
    <p class="sample">Readable text: Aa Ee 0123456789.</p>
  </div>
  <div>
    <p class="label">Local trial · antialiased / grayscale</p>
    <p class="sample adjusted">Readable text: Aa Ee 0123456789.</p>
  </div>
</div>
.font-smooth-guide-trial {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  overflow-wrap: anywhere;

  .label {
    margin-block: 0 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  .sample {
    max-inline-size: 36ch;
    margin: 0;
    font-family: system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
  }

  .adjusted {
    @supports (-webkit-font-smoothing: antialiased) {
      -webkit-font-smoothing: antialiased;
    }

    @supports (-moz-osx-font-smoothing: grayscale) {
      -moz-osx-font-smoothing: grayscale;
    }
  }
}

Apparent weight can change without changing font-weight. A thinner stroke is not automatically easier to read or an improvement in contrast. Review small and large text, light and dark themes, with the final font on target devices before keeping a local exception.

For a general interface, keep the browser’s choice. If you need a larger size, different weight, or greater contrast, adjust those decisions directly. Do not copy this trial to html, body, or a universal selector as a normalization recipe.

Common mistakes

Both rows look identical

Expected result
The comparison communicates what can be observed in this environment.
Cause
The value may be ignored, match the default choice, or produce no perceptible difference with that system, font, or display.
Solution
Check each declaration and try the target device. Do not exaggerate the effect with opacity, shadows, filters, or a different weight: that would change the comparison.

A global adjustment makes text too thin

Expected result
Reading stays clear across sizes, themes, and devices.
Cause
A preference chosen for a heading inherits throughout the page and may alter the appearance of small text.
Solution
Remove the global rule and return to auto in the evaluated scope. If there is a verified reason, restrict the exception to that content and check legibility; do not present a thinner appearance as an accessibility guarantee.

A screenshot seems to prove universal support

Expected result
Evidence identifies the browser, system, and observation conditions.
Cause
CSS.supports or computed styles only prove acceptance/application; a resized image also changes how edges are observed.
Solution
Distinguish accepted syntax, the computed value, and the visual result. Compare in the final environment without attributing the same effect to every browser or display.

Support and compatibility

This is not an interoperable standard feature. MDN documents the variants as macOS-specific and BCD records alternative names per browser, not general support for the unprefixed font-smooth name or every value. The reasonable fallback is to preserve browser rendering and readable text.

The prefix does not exclusively identify an engine either: Mozilla documents an alias from -webkit-font-smoothing: antialiased to -moz-osx-font-smoothing: grayscale on macOS starting in Firefox 128. This does not prove support for every WebKit value in Firefox.

@supports checks each syntax separately; it does not detect actual rasterization or certify visual quality. If a declaration is ignored, the text remains available with its base typography. No polyfill or JavaScript simulation is needed.