mirror of
https://github.com/jimeh/commonflow.org.git
synced 2026-02-19 05:46:40 +00:00
feat: migrate to Astro's experimental font API
Replace @fontsource-variable NPM packages with Astro's built-in experimental font API using the Fontsource provider. Fonts are now fetched at build time, cached locally, and served with the site. This provides automatic @font-face generation, preload link injection, and metric-adjusted fallback fonts (size-adjust, ascent-override, etc.) to reduce CLS during font loading. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
--color-accent: theme(colors.sky.500);
|
||||
--color-accent-light: theme(colors.sky.400);
|
||||
|
||||
/* Fonts - self-hosted via fontsource */
|
||||
--font-display: "Bricolage Grotesque Variable", system-ui, sans-serif;
|
||||
--font-sans: "DM Sans Variable", system-ui, sans-serif;
|
||||
--font-mono: "JetBrains Mono Variable", "SF Mono", Consolas, monospace;
|
||||
/* Fonts - via Astro experimental font API (fontsource provider) */
|
||||
--font-display: var(--font-bricolage);
|
||||
--font-sans: var(--font-dm-sans);
|
||||
--font-mono: var(--font-jetbrains);
|
||||
|
||||
/* Sizing */
|
||||
--header-height: 4rem;
|
||||
|
||||
Reference in New Issue
Block a user