From 2b819590b49a2dcac1c80466221791d5c158ee5a Mon Sep 17 00:00:00 2001 From: Maximilian Kaske <56969857+mxkaske@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:13:54 +0200 Subject: [PATCH] Add Commit Mono font and configure monospace font stack (#2356) * feat(web): use Commit Mono as the monospace font Load CommitMono via next/font/local in the root layout and map Tailwind's --font-mono to it, matching the dashboard and status-page apps. All existing font-mono usage now renders in Commit Mono. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_011v4nLgnniGav1frub1yxJ9 * fix(web): map --font-mono via @theme inline so it resolves under body The plain @theme block emits the variable on :root, where next/font's --font-commit-mono (set on body) is undefined, breaking every font-mono utility. @theme inline inlines the reference so it resolves at the element, matching the dashboard and status-page setup. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_011v4nLgnniGav1frub1yxJ9 --------- Co-authored-by: Claude --- apps/web/src/app/layout.tsx | 28 +++++++++++++++++++++++++++- apps/web/src/styles/globals.css | 4 ++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index cdd6ea15..a4059156 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -25,6 +25,32 @@ const calSans = LocalFont({ variable: "--font-cal", }); +const commitMono = LocalFont({ + src: [ + { + path: "../public/fonts/CommitMono-400-Regular.otf", + weight: "400", + style: "normal", + }, + { + path: "../public/fonts/CommitMono-400-Italic.otf", + weight: "400", + style: "italic", + }, + { + path: "../public/fonts/CommitMono-700-Regular.otf", + weight: "700", + style: "normal", + }, + { + path: "../public/fonts/CommitMono-700-Italic.otf", + weight: "700", + style: "italic", + }, + ], + variable: "--font-commit-mono", +}); + export const metadata: Metadata = { ...defaultMetadata, twitter: { @@ -45,7 +71,7 @@ export default function RootLayout({ diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css index deae2997..eb5746e5 100644 --- a/apps/web/src/styles/globals.css +++ b/apps/web/src/styles/globals.css @@ -44,6 +44,10 @@ } } +@theme inline { + --font-mono: var(--font-commit-mono); +} + @utility container { margin-inline: auto; padding-inline: 2rem; -- 2.51.2