Commit 4c6b188
authored
fix(frontend): apply Geist to body text (#170)
Geist and Geist Mono are loaded in layout.tsx and their variables are
mapped to Tailwind's font-sans and font-mono, but globals.css still
carried the create-next-app default of `body { font-family: Arial,
Helvetica, sans-serif; }`. That override won everywhere, so Geist Sans
reached only elements that named `font-sans` explicitly, of which there
is exactly one in the whole application.
The result was that Geist Sans was downloaded on every page load and then
applied to almost nothing, while the interface rendered in Arial. Geist
Mono was unaffected, since its twenty call sites all use `font-mono`.
Setting the body font to the variable makes the loaded font the inherited
default, which is what the existing wiring already assumed. The variable
resolves to `Geist, Geist Fallback`, and that fallback is Arial with
size-adjust and metric overrides generated by Next, so the swap when the
webfont lands does not reflow the page. The `var()` default and the
trailing generics only apply if the font class is ever absent from body.
docs/DESIGN.md is updated in the same commit, since it documented the
previous behaviour.1 parent 3e68002 commit 4c6b188
2 files changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| |||
0 commit comments