fix(web): bridge Tailwind --font-sans to --theme-font-sans (#20406)

Tailwind v4 defines its own --font-sans and --font-mono tokens
independently of the Hermes theme variables. Components using
font-sans/font-mono utility classes bypass --theme-font-sans and
--theme-font-mono, so theme font changes have no effect.

Add --font-sans and --font-mono bridges in the @theme inline block
so Tailwind's font tokens follow the active Hermes theme.

Fixes #20380
This commit is contained in:
liuhao1024 2026-05-29 12:19:06 +08:00 committed by GitHub
parent 100536134c
commit 28bb7e0a8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,6 +115,8 @@ code, kbd, pre, samp, .font-mono, .font-mono-ui {
all proportionally in Tailwind v4. */
@theme inline {
--spacing: calc(0.25rem * var(--theme-spacing-mul, 1));
--font-sans: var(--theme-font-sans);
--font-mono: var(--theme-font-mono);
}
#root {