fix: use @theme inline so Geist variables resolve (fixes #553) - #561
Merged
Conversation
cevheri
approved these changes
Sep 5, 2026
Member
|
Thank you for the fix, and welcome as a first-time contributor here. Confirmed on a production build with Playwright Chromium, side by side with main: on main both GeistSans and GeistMono report unloaded and body computes to Tailwind's preflight system stack; with your change both load and body computes to GeistSans, so the cause was exactly the one #553 suspected. I pushed one commit on top of yours with the e2e assertion the issue's second done-when asked for (e2e/login.spec.ts). It fails on main and passes on this branch, so the fix and its guard land together. Merging once CI is green. |
Pins the second "done when" of libredb#553: document.fonts must report GeistSans and GeistMono as loaded and body must compute to GeistSans. Fails on main, where both faces sit at unloaded and body renders Tailwind's preflight system stack, and passes with the @theme inline change.
cevheri
force-pushed
the
fix/issue-553-geist-font
branch
from
September 5, 2026 07:37
45b7508 to
da5270a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #553 — production build renders in the OS system font, not Geist. document.fonts lists GeistSans/GeistMono as unloaded though the woff2 files download, and computed font-family on body is a system stack.
Root cause
src/app/globals.css mapped --font-sans/--font-mono inside a plain @theme block. Tailwind v4 emits plain @theme values on :root, but next/font defines --font-geist-sans/mono on body via the .variable class (see src/app/layout.tsx), so at :root the var() reference resolves to nothing. The color mappings lower in the same file already correctly use @theme inline.
Fix
@theme to @theme inline for the font block. 1-line CSS-only diff; the var() reference now stays live and resolves at use time on body.
Verification