mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-27 09:19:53 +00:00
The docs estate declared its typeface in 30 root layouts and one linked stylesheet, each pulling a third-party family off a hosted font CDN on the critical path of every route. Two of those surfaces also self-hosted the faces, so the same bytes were vendored by hand in the repo. @hanzo/font 1.8.8 is where Zen is authored. It is now mounted the way this repo already mounts every other package stylesheet — `@import '@hanzo/font/css'` at the top of the app's own sheet — which declares the @font-face rules and publishes --font-zen-sans / --font-zen-mono. A single :root block per app binds those to --font-sans / --font-mono, the pair every rule and every font-* utility already read, so the variable contract is untouched and the next face swap is two lines rather than a sweep. Genuine system fallbacks stay. Mounting through the sheet rather than a JS side-effect import also drops the untyped bare subpath TypeScript could not resolve, so no per-app declaration shim is needed. public/reference/ is static HTML with no bundler, so it keeps its own @font-face; scripts/sync-reference-fonts.ts copies the two variable faces out of the installed package on each build and the directory is ignored, the same rule public/openapi/ already follows. The hand-vendored faces are deleted. Also corrects the brand typography table, which still named a face Hanzo does not ship, and the three sample configs and two skill pages that repeated it.
49 lines
1.3 KiB
CSS
49 lines
1.3 KiB
CSS
@import '@hanzo/font/css';
|
|
@import 'tailwindcss';
|
|
|
|
/* Zen is the family. The import above declares the faces and publishes
|
|
--font-zen-sans / --font-zen-mono; they are spelled HERE and nowhere else,
|
|
bound to the --font-sans / --font-mono pair every rule and every font-*
|
|
utility already reads — so the next face swap is these two lines, not a sweep.
|
|
Unlayered, so it outranks Tailwind's own @layer theme defaults. */
|
|
:root {
|
|
--font-sans: var(--font-zen-sans), ui-sans-serif, system-ui, sans-serif;
|
|
--font-mono: var(--font-zen-mono), ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
}
|
|
|
|
@theme {
|
|
--color-accent: #ffffff;
|
|
--color-accent-muted: rgba(255, 255, 255, 0.08);
|
|
--color-accent-border: rgba(255, 255, 255, 0.12);
|
|
|
|
--color-bg: #090a0c;
|
|
--color-bg-card: rgba(17, 17, 17, 0.8);
|
|
--color-bg-elevated: #111113;
|
|
--color-bg-subtle: #0f1012;
|
|
--color-border: rgba(255, 255, 255, 0.06);
|
|
--color-border-hover: rgba(255, 255, 255, 0.15);
|
|
--color-text: #f0f0f0;
|
|
--color-text-muted: #8a8a8a;
|
|
--color-text-dim: #555555;
|
|
}
|
|
|
|
@theme inline {
|
|
--default-font-family: var(--font-sans);
|
|
--default-mono-font-family: var(--font-mono);
|
|
}
|
|
|
|
html {
|
|
scrollbar-gutter: stable;
|
|
color-scheme: dark;
|
|
}
|
|
|
|
body {
|
|
background-color: var(--color-bg);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
::selection {
|
|
background-color: rgba(255, 255, 255, 0.15);
|
|
color: white;
|
|
}
|