Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"cloudinary": "^1.32.0",
"eslint-config-next": "^15.0.0",
"framer-motion": "^7.6.4",
"geist": "^1.7.2",
"geist": "^1.3.1",
"i": "^0.3.7",
"imagemin": "^8.0.1",
"imagemin-jpegtran": "^7.0.0",
Expand Down
8 changes: 7 additions & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ import { GeistMono } from "geist/font/mono";
import "./global.css";

export default function MyApp({ Component, pageProps }: AppProps) {
// next/font (and geist, which wraps it) is NOT supported in _document.tsx —
// Next emits the class names but never injects the @font-face / CSS-variable
// rules, so --font-geist-* resolve to empty and the page falls back to the
// default sans stack. It must be loaded here in _app.tsx instead. The
// .variable classes define --font-geist-sans / --font-geist-mono (consumed by
// --font-mono in global.css); .className sets the base Geist Sans family.
return (
<div
className={`${GeistSans.variable} ${GeistMono.variable} ${GeistSans.className}`}
className={`rd-fonts ${GeistSans.variable} ${GeistMono.variable} ${GeistSans.className}`}
>
<Component {...pageProps} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class MyDocument extends Document {
}}
/>
</Head>
<body className="antialiased">
<body>
<Main />
<NextScript />
</body>
Expand Down
12 changes: 12 additions & 0 deletions pages/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ body {
--font-mono: var(--font-geist-mono), ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

/*
* Pages Router: next/font's --font-geist-* variables are injected on the
* wrapper element in _app.tsx, NOT on <html>. The --font-sans/--font-mono
* tokens above are declared at :root, where --font-geist-* don't exist, so
* they compute to empty and inherit down empty. Re-declare the tokens here on
* the wrapper (which carries the geist vars) so var(--font-geist-*) resolves.
*/
.rd-fonts {
--font-sans: var(--font-geist-sans), 'Inter', ui-sans-serif, system-ui, sans-serif;
--font-mono: var(--font-geist-mono), ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

.dark {
--rd-bg: #0a0a0a;
--rd-bg-sub: #0e0e0e;
Expand Down
Loading