Skip to content

Fix Inter font not applying to UI elements#461

Merged
realproject7 merged 1 commit intomainfrom
hotfix/inter-font-fix
Mar 23, 2026
Merged

Fix Inter font not applying to UI elements#461
realproject7 merged 1 commit intomainfrom
hotfix/inter-font-fix

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

Inter (sans-serif) wasn't rendering on UI elements (nav, buttons, inputs). DevTools showed font-family resolving to Lora instead of Inter.

Root cause: --font-ui was defined in @theme inline using var(--font-inter), but Next.js sets --font-inter on <body> at runtime via a class. Tailwind's @theme inline is processed at build time and can't see runtime CSS variables — so var(--font-inter) resolved to nothing, falling back to Lora.

Fix: Use var(--font-inter) directly in the CSS rule (where it resolves at runtime) instead of going through the @theme variable.

The --font-ui variable in @theme inline used var(--font-inter) which
doesn't resolve at build time — Next.js sets --font-inter on <body>
at runtime via a class. Use var(--font-inter) directly in the CSS rule
instead of going through the @theme variable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@realproject7 realproject7 merged commit e7058c0 into main Mar 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant