Skip to content

Commit 819b6d1

Browse files
committed
fix(styles): define font-heading class in Tailwind config
- Add fontFamily.heading to theme.extend in tailwind.config.ts ('font-heading' was a no-op class — CardTitle and DialogTitle had no applied font-family, silently falling back to browser default) - Add --font-heading CSS variable to :root in globals.css (defaults to Inter — easy to override system-wide with one change) - font-heading is used in components/ui/card.tsx (CardTitle) and components/ui/dialog.tsx (DialogTitle)
1 parent 78bcdf2 commit 819b6d1

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

app/globals.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
* - Brand Logos: Background wrappers for external logos that require specific contrast.
2525
*/
2626
:root {
27+
/* ── Font tokens ── */
28+
/* font-heading resolves the Tailwind `font-heading` utility (card.tsx, dialog.tsx).
29+
Defaults to Inter — override this variable to swap in a display font globally. */
30+
--font-heading: "Inter", system-ui, sans-serif;
31+
2732
/* ── Shadow tokens ── */
2833
--shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
2934
--shadow-card-hover: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);

tailwind.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ const config: Config = {
8888
"nav-bottom": "var(--shadow-nav-bottom)",
8989
"surface-xl": "var(--shadow-xl)",
9090
},
91+
fontFamily: {
92+
// Resolves the `font-heading` utility used in card.tsx and dialog.tsx.
93+
// Reads from the --font-heading CSS variable set in globals.css (Inter),
94+
// with a safe system-ui fallback.
95+
heading: ["var(--font-heading)", "system-ui", "sans-serif"],
96+
},
9197
},
9298
},
9399
plugins: [require("tailwindcss-animate")],

0 commit comments

Comments
 (0)