diff --git a/custom.css b/custom.css deleted file mode 100644 index c2791a8..0000000 --- a/custom.css +++ /dev/null @@ -1,169 +0,0 @@ -/* - * usezombie Mintlify overrides — Operational Restraint. - * - * Layered after Mintlify's base theme. Replaces the heritage orange - * primary chrome with design-system tokens, swaps the default code - * block syntax theme for a calm Vesper-style palette, and anchors - * typography on Commit Mono (headings) + Instrument Sans (body). - * - * The wake-pulse animation on the brand-mark logo is baked into the - * SVGs themselves (see /logo/dark.svg and /logo/light.svg) — not - * here — so it survives Mintlify's logo render path without needing - * a custom React component. This file owns everything else. - * - * `--pulse` appears EXACTLY ONCE on the docs site: the brand-mark - * logo in the top nav. Any other use is a violation. - */ - -@import url("./tokens.css"); - -/* Self-hosted brand faces. Latin subset only — full character set - * ships ~300KB; subsetted weights stay under 80KB and meet the docs - * perf budget. Single source of truth — Mintlify's docs.json `fonts` - * config is intentionally empty so we don't double-fetch. Instrument - * Sans is the variable wght-axis file (30KB), serving every weight - * from one download. */ -@font-face { - font-family: "Commit Mono"; - src: url("/fonts/CommitMono-Regular.woff2") format("woff2"); - font-weight: 400; - font-style: normal; - font-display: swap; -} -@font-face { - font-family: "Commit Mono"; - src: url("/fonts/CommitMono-Medium.woff2") format("woff2"); - font-weight: 500; - font-style: normal; - font-display: swap; -} -@font-face { - font-family: "Instrument Sans"; - src: url("/fonts/InstrumentSans-Variable.woff2") format("woff2-variations"), - url("/fonts/InstrumentSans-Variable.woff2") format("woff2"); - font-weight: 400 700; - font-style: normal; - font-display: swap; -} - -/* Body + headings. Mintlify's default body class is `body` plus a - * Tailwind-emitted `font-sans`; bumping specificity with `:where()` - * keeps us layered correctly without piling !important on every rule. - * Falls back through system-ui so a slow-3G first paint still reads. - * - * font-size lives on `body` only — touching `html` would redefine - * the rem unit (16px → 15px ≈ 6% shrink) and silently rescale every - * Mintlify rule expressed in rem. Body keeps inheritance to children - * without compounding into the rem base. */ -:where(body) { - font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", - sans-serif; - font-size: var(--uz-fs-body); - line-height: 1.55; -} - -/* Heading family + weight is uniform; tracking is per-level per - * DESIGN_SYSTEM.md §Type scale (display-xl tightest, heading flat). */ -:where(h1, h2, h3, h4, h5, h6) { - font-family: "Commit Mono", "JetBrains Mono", ui-monospace, "Cascadia Code", - monospace; - font-weight: 500; -} -:where(h1) { letter-spacing: -0.025em; } -:where(h2) { letter-spacing: -0.02em; } -:where(h3) { letter-spacing: -0.015em; } -:where(h4, h5, h6) { letter-spacing: 0; } - -/* Long-form prose measure. Mintlify's content column is roughly - * 720-768px today; clamping with the design-system `--uz-measure` - * holds line length around 68ch on wide monitors. */ -.prose, -article.prose, -main article { - max-width: var(--uz-measure); -} - -/* Inline code: Commit Mono on a low surface, no border, small radius. */ -:where(code):not(pre code) { - font-family: "Commit Mono", "JetBrains Mono", ui-monospace, monospace; - font-size: var(--uz-fs-mono); - background: var(--uz-surface-1); - color: var(--uz-text); - padding: 0.125rem 0.375rem; - border-radius: var(--uz-r-sm); - border: 0; -} - -/* Code blocks. Mintlify renders syntax via Shiki, which emits inline - * `style="--shiki-…"` attributes rather than Prism `.token.keyword` - * classes — overriding token classes is dead CSS against Shiki output. - * The actual syntax palette is selected by `styling.codeblocks: "dark"` - * in docs.json (Mintlify's built-in dark theme). This block owns only - * the chrome around the code (font, surface, border, radius). */ -pre code { - font-family: "Commit Mono", "JetBrains Mono", ui-monospace, monospace; - font-size: var(--uz-fs-mono); - line-height: 1.6; -} - -pre, -:where(pre[class*="language-"]) { - background: var(--uz-surface-deep); - border: 1px solid var(--uz-border); - border-radius: var(--uz-r-md); -} - -/* Tables: tabular numerals on numeric-looking cells. Cheap heuristic — - * apply to every td in API-reference tables; the design-system - * preview uses font-variant-numeric: tabular-nums on data tables. - * Visual cost on prose tables is zero. */ -table td, -table th { - font-variant-numeric: tabular-nums; -} - -/* Focus ring — the calm pulse glow, no animation. Matches the - * design-system spec: `box-shadow: 0 0 0 3px var(--pulse-glow)`. */ -:focus-visible { - outline: 2px solid var(--uz-pulse); - outline-offset: 2px; - box-shadow: 0 0 0 3px var(--uz-pulse-glow); - border-radius: var(--uz-r-sm); -} - -/* Cover-page dot grid. Inner pages stay clean — opt-in via the - * `cover-grid` className on the index.mdx hero wrapper. The - * pseudo-element handles the 8% opacity tint and needs `.cover-grid` - * itself to be a positioned ancestor; without `position: relative` - * here, `position: absolute` on `::before` would escape to the - * nearest positioned ancestor (often the page root) and tint - * everything. */ -.cover-grid { - position: relative; -} -.cover-grid::before { - content: ""; - position: absolute; - inset: 0; - background-image: - radial-gradient(circle, var(--uz-border) 1px, transparent 1px); - background-size: 24px 24px; - background-position: 0 0; - opacity: 0.08; - pointer-events: none; -} - -/* Reduced motion: kill every transition and animation site-wide, - * with one caveat — the brand-mark logo's wake-pulse SVG already - * carries its own prefers-reduced-motion fallback (a static glow), - * so we don't need to special-case it here. */ -@media (prefers-reduced-motion: reduce) { - *, - *::before, - *::after { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - scroll-behavior: auto !important; - } -} diff --git a/docs.json b/docs.json index cf032ac..5be4c77 100644 --- a/docs.json +++ b/docs.json @@ -7,8 +7,24 @@ "light": "#5eead4", "dark": "#2dd4bf" }, + "fonts": { + "heading": { + "family": "Commit Mono", + "source": "/fonts/CommitMono-Medium.woff2", + "format": "woff2", + "weight": 500 + }, + "body": { + "family": "Instrument Sans", + "source": "/fonts/InstrumentSans-Variable.woff2", + "format": "woff2", + "weight": 400 + } + }, "styling": { - "codeblocks": "dark" + "codeblocks": { + "theme": "vesper" + } }, "favicon": "/favicon.svg", "navigation": { @@ -252,7 +268,7 @@ ], "primary": { "type": "button", - "label": "Mission Control", + "label": "Install", "href": "https://app.usezombie.com" } }, diff --git a/fonts/CommitMono-Regular.woff2 b/fonts/CommitMono-Regular.woff2 deleted file mode 100644 index d455b20..0000000 Binary files a/fonts/CommitMono-Regular.woff2 and /dev/null differ diff --git a/style.css b/style.css new file mode 100644 index 0000000..62e4e97 --- /dev/null +++ b/style.css @@ -0,0 +1,52 @@ +/* + * usezombie Mintlify overrides — Operational Restraint. + * + * Mintlify's docs.json owns the bulk of the theming (colors, fonts, + * code-block syntax theme). This file owns only the bits the schema + * can't express. Filename is `style.css` per Mintlify's documented + * convention for cloud-build custom CSS pickup. + * + * Source-of-truth tokens live in + * ~/Projects/usezombie/ui/packages/design-system/src/tokens.css. + * Hex literals here are mirrored from there — change upstream first, + * land here in the same release window. + */ + +/* + * Variable-axis @font-face for Instrument Sans body. + * + * Mintlify's docs.json `fonts.body.weight` is schema-typed as a single + * number, so its build-time @font-face registers only weight 400 — + * `` and `font-weight: 700` would fall back to system. The + * woff2 we ship is the wght-axis variable file (covers 400–700), so + * we re-register the same family here with the full range. Browsers + * resolve font-face entries by font-weight match; the bold range + * picks our declaration when the requested weight is > 400. + */ +@font-face { + font-family: "Instrument Sans"; + src: url("/fonts/InstrumentSans-Variable.woff2") format("woff2-variations"), + url("/fonts/InstrumentSans-Variable.woff2") format("woff2"); + font-weight: 400 700; + font-style: normal; + font-display: swap; +} + +/* + * Primary navbar button — "Install" CTA. + * + * The fill comes from `colors.primary` in docs.json (#14B8A6 cyan-mint, + * `--pulse` light-mode value). Mintlify auto-computes the foreground + * by contrast and lands on white, but the design system's --on-pulse + * token is THEME-FIXED dark (#0A0D0E) in both modes — that's the + * canonical foreground for content layered on the pulse surface + * (per ui/packages/design-system/src/tokens.css). Force it. + * + * Selector targets the navbar primary button by its href; this is + * stable against Mintlify's class-name churn between minor releases. + */ +a[href="https://app.usezombie.com"], +a[href="https://app.usezombie.com"] *, +[data-mintlify-primary-button] { + color: #0a0d0e; +} diff --git a/tokens.css b/tokens.css deleted file mode 100644 index 8f778fa..0000000 --- a/tokens.css +++ /dev/null @@ -1,84 +0,0 @@ -/* - * usezombie design tokens — docs.usezombie.com transcription. - * - * Mirrors ui/packages/design-system/src/tokens.css from the usezombie - * repo. Mintlify can't import from a workspace package, so the token - * values are duplicated here verbatim. Keep them in sync — any change - * upstream lands here in the same release window. Source of truth: - * docs/DESIGN_SYSTEM.md in the usezombie repo. - * - * Operational Restraint: dark is the brand's primary surface; light - * mirrors via [data-theme="light"] for full parity. The bioluminescent - * --pulse accent is currency, used EXACTLY ONCE on the docs site — - * the brand-mark in the top nav. Every other accent uses muted / - * subtle / info / warn / error / evidence. - */ - -:root { - /* Surfaces (dark — brand primary). */ - --uz-surface-deep: #06090a; - --uz-bg: #0a0d0e; - --uz-surface-1: #11161a; - --uz-surface-2: #181e22; - --uz-surface-3: #1f262c; - - /* Borders. */ - --uz-border: #23292e; - --uz-border-strong: #2e373e; - - /* Text. */ - --uz-text: #e6eaec; - --uz-text-muted: #8b9398; - --uz-text-subtle: #5c6469; - - /* The pulse — currency, never decoration. */ - --uz-pulse: #5eead4; - --uz-pulse-dim: #2dd4bf; - --uz-pulse-glow: rgba(94, 234, 212, 0.35); - --uz-on-pulse: #0a0d0e; - - /* Status (sparingly). */ - --uz-success: #34d399; - --uz-warn: #f59e0b; - --uz-error: #f87171; - --uz-info: #60a5fa; - --uz-evidence: #fbbf24; - - /* Radii. */ - --uz-r-sm: 2px; - --uz-r-md: 4px; - --uz-r-lg: 6px; - - /* Type scale. */ - --uz-fs-display-xl: 4rem; - --uz-fs-display-lg: 2.5rem; - --uz-fs-display-md: 1.75rem; - --uz-fs-heading: 1.125rem; - --uz-fs-body-lg: 1.125rem; - --uz-fs-body: 0.9375rem; - --uz-fs-body-sm: 0.8125rem; - --uz-fs-mono: 0.8125rem; - - /* Layout — single-column docs measure. */ - --uz-measure: 720px; -} - -/* Light mode. Polite afterthought, not the brand's first impression. - * Mintlify toggles its own theme; we mirror tokens on the same trigger - * via the html[data-theme] / .light selectors that Mintlify emits. */ -html.light, -[data-theme="light"] { - --uz-surface-deep: #efece5; - --uz-bg: #f8f6f1; - --uz-surface-1: #f1eee6; - --uz-surface-2: #e9e5da; - --uz-surface-3: #dfdacb; - --uz-border: #d4cdb9; - --uz-border-strong: #b7ae96; - --uz-text: #1a1d1e; - --uz-text-muted: #5a625f; - --uz-text-subtle: #8a918a; - --uz-pulse: #14b8a6; - --uz-pulse-dim: #0d9488; - --uz-pulse-glow: rgba(20, 184, 166, 0.3); -}