fix(design): wire fonts via Mintlify schema, "Install" CTA, drop dead CSS#44
Conversation
… CSS Live audit of docs.usezombie.com after PR #43 merged surfaced that custom.css and tokens.css 404 on the cloud-built site — Mintlify's docs.json schema has no key for arbitrary custom stylesheets, and the "custom.css at project root" claim from their SKILL.md doesn't apply to this build. Net effect: typography never landed (body still rendered Mintlify's default Inter), and the two CSS files shipped as dead code. This PR routes everything Mintlify CAN do through docs.json directly, keeps style.css scoped to the one override Mintlify can't express, and deletes the rest. docs.json: - fonts.heading + fonts.body restored, pointing at the deployed woff2 files. Mintlify build-time injects @font-face from this config. - styling.codeblocks "dark" → { theme: "vesper" } — Mintlify's schema accepts the Vesper Shiki theme by name, matching the spec's calm syntax theme without needing custom CSS. - navbar.primary.label "Mission Control" → "Install" per direction. style.css (renamed from custom.css; Mintlify's documented filename): - Single rule: dark text on the pulse-cyan primary button. Mintlify auto-computes contrast and picks white; the design-system's --on-pulse token is theme-fixed dark (#0A0D0E) so we force it. - All previous styling (typography family rules, code-block chrome, focus ring 3px, ~68ch measure, dot-grid, prefers-reduced-motion guard) deleted — those weren't loading anyway. Removed: - custom.css (dead — never loaded by Mintlify) - tokens.css (dead — same) - fonts/CommitMono-Regular.woff2 (orphaned once only Medium is wired through Mintlify's heading font config) What still works from PR #43: brand-mark wake-pulse animation (embedded in the SVG <style> block — the one piece of theming that survives Mintlify's render path), pulse-cyan primary chrome, dark code blocks, the changelog Update entry, the AGENTS.md token documentation refresh. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
P1 (style.css): dropped the `nav button[type="button"]` catch-all selector. It would have forced #0a0d0e on every icon button inside <nav> — theme toggle, search trigger, mobile hamburger — making them invisible against dark-mode chrome. The first three selectors already cover the primary "Install" button by href and by Mintlify's data attribute; the catch-all was unnecessary. P2 (docs.json): body font weight 400 → "400 700". Instrument Sans ships as a variable wght-axis face, but `weight: 400` (single number) makes Mintlify register only the 400 face — bold body text (<strong>, **markdown**, etc.) falls back to system. The range covers the full axis the variable file actually serves. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Both addressed in b9892c0.
|
…n style.css
Mintlify's docs.json schema enforces fonts.body.weight as a number,
not a string. The previous "400 700" attempt failed `mintlify validate`
in CI ("Invalid type. Expected field to be of type 'number'").
Reverted body weight to 400 so the build validates. To still serve
bold body text from the variable face (the original intent of
greptile's P2), added a parallel @font-face declaration in style.css
with `font-weight: 400 700` covering the full wght axis. Browsers
match font-faces by font-weight, so `<strong>` (700) resolves to
this declaration while regular body text (400) keeps using whichever
@font-face Mintlify generates from docs.json.
Caveat: this only kicks in once style.css actually loads on the
cloud-built site. If it doesn't, we degrade gracefully to Mintlify's
weight-400-only registration — same result we'd have without this
file at all.
Verified locally: `mintlify validate` → success.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Lint failure was the schema enforcement we worried about: `Mintlify validate` rejects `weight: "400 700"` ("Expected 'number'"). Fixed in 8ad246b:
|
Summary
Follow-up to #43. Live audit of docs.usezombie.com after #43 merged showed that the
custom.cssandtokens.cssfiles 404 on the cloud-built site — Mintlify'sdocs.jsonschema has no key for arbitrary custom stylesheets, and the "custom.css at project root" claim from their SKILL.md doesn't apply to this cloud build. Net effect: the typography never landed (body still rendered Inter), and ~250 lines of CSS were dead code.This PR routes everything Mintlify can express through
docs.jsondirectly, keepsstyle.cssscoped to the one rule Mintlify can't express, and drops the rest.What changed
docs.jsonfonts.heading+fonts.bodyrestored, pointing at the deployed woff2 files. Mintlify build-time injects@font-facefrom this config.styling.codeblocks: "dark"→{ "theme": "vesper" }. Mintlify's schema accepts the Vesper Shiki theme by name, matching the spec's "calm Vesper-style" syntax without needing custom CSS.navbar.primary.label: "Mission Control" → "Install".style.css(renamed fromcustom.css; Mintlify's documented filename for cloud-build CSS pickup)--on-pulsetoken is theme-fixed dark (#0A0D0E) pertokens.cssline 49, so we force it.custom.css(dead — never loaded by Mintlify)tokens.css(dead — imported only by the dead custom.css)fonts/CommitMono-Regular.woff2(orphaned once only the Medium weight is wired through Mintlify's heading font config)What still works from #43
<style>block — the one piece of theming that survives Mintlify's render path; verified live: mintcdn proxies the SVG asimage/svg+xml, not rasterized)colors.primaryindocs.json<Update>entryAGENTS.md"Design system colors" token documentation refreshBranch hygiene
chore/m64-007-design-w4pruned from origin after merge.Verification
/fonts/CommitMono-Medium.woff2and/fonts/InstrumentSans-Variable.woff2fetched, nofonts.googleapis.comrequests🤖 Generated with Claude Code
Greptile Summary
This PR fixes the typography regression from #43 by routing font configuration through
docs.json(which Mintlify's cloud build actually reads) and renamingcustom.css→style.css(Mintlify's documented pickup filename), dropping ~250 lines of CSS that were 404-ing and never applied.docs.json: Addsfonts.heading(Commit Mono Medium) andfonts.body(Instrument Sans), switchesstyling.codeblocksfrom the\"dark\"shorthand to{ \"theme\": \"vesper\" }, and renames the nav CTA to "Install".style.css: Slim replacement forcustom.css— re-registers Instrument Sans with a fullfont-weight: 400 700range to cover bold body text thatdocs.json's single-weight entry can't express, and forces the design-system's theme-fixed dark foreground on the pulse-cyan CTA button.custom.css,tokens.css, andfonts/CommitMono-Regular.woff2— all orphaned once the Medium weight is the only heading variant wired throughdocs.json.Confidence Score: 5/5
Safe to merge — the change is purely additive config and CSS with no logic, no data paths, and no breaking changes to existing functionality.
All changes are declarative: docs.json schema fields and a 52-line CSS file. The previous review concerns about the broad nav button selector and the variable-font weight range are both addressed — the broad selector is gone, and the full 400 700 range is re-registered in style.css with an explanatory comment. The deleted files were confirmed dead (404 in the cloud build). No regressions are expected.
No files require special attention. The Mintlify deploy preview verification checklist in the PR description is the appropriate final gate.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Mintlify Cloud Build] --> B[docs.json] B --> C["fonts.heading: Commit Mono Medium, weight 500"] B --> D["fonts.body: Instrument Sans Variable, weight 400"] B --> E["styling.codeblocks: vesper"] B --> F["navbar.primary: Install"] A --> G["style.css - cloud CSS pickup"] G --> H["font-face: Instrument Sans, weight 400-700"] G --> I["CTA selectors: color #0a0d0e"] C --> J["/fonts/CommitMono-Medium.woff2"] D --> K["/fonts/InstrumentSans-Variable.woff2"] H --> KReviews (3): Last reviewed commit: "fix: lint — revert body weight to number..." | Re-trigger Greptile