Skip to content

docs: enable dark mode behind theme toggle (default stays light)#391

Draft
jarugupj wants to merge 7 commits into
mainfrom
phani/dark-mode-enable
Draft

docs: enable dark mode behind theme toggle (default stays light)#391
jarugupj wants to merge 7 commits into
mainfrom
phani/dark-mode-enable

Conversation

@jarugupj
Copy link
Copy Markdown
Contributor

Summary

Enables the Mintlify theme toggle so docs readers can switch to dark mode. The default appearance stays light — first-time visitors see no change, the toggle is opt-in.

Changes

  • docs.jsonappearance.strict: false, dark logo + dark background #111113 (Radix Gray dark-01).
  • logo/light.svg#EDEEF0 recolor of the existing logo (paths byte-identical to black.svg) used in dark mode.
  • style.csshtml.dark-scoped overrides for tables, the .tinker-box border, and the pricing button border. Light mode rules untouched.
  • images/tinker-bot-dark.svg + one CSS swap — the hero bot is a flat #1C2024 silhouette that's invisible against #111113, so it gets a #EDEEF0 recolor.

Notes

  • Default stays light by design. This PR only restores the toggle; it does not flip the default. That's a separate brand call to make later.
  • Homepage card illustrations intentionally keep their light tiles on dark. They read as framed illustrations (same pattern Stripe, Linear, Notion use) and keep the cream brand vibe consistent with the kernel.sh landing. Not a bug.
  • Only the tinker-bot got a dark variant because it's a silhouette without a card frame — that one's a real readability fix, not a brand call.
  • WCAG AAA contrast: body #EDEEF0 on #111113 ≈ 16:1, accent #CAB168 on #111113 ≈ 9:1.

Test plan

  • Visual: load Mintlify preview, toggle dark on/off across Guides, API Reference, CLI, MCP, Changelog
  • Tables + code blocks readable in dark
  • Light mode unchanged (existing pages render byte-for-byte the same)
  • Mobile/narrow viewport in dark mode

jarugupj and others added 3 commits May 29, 2026 22:46
- Add light/dark logo pair and dark background (#111113, brand grey-dark scale)
- Add html.dark overrides for tables, tinker-box, button border, hero bot
- Keep default appearance light; dark is opt-in pending brand/design review
- add dark-recolored variants for the four homepage card svgs
  (o11y, chromium, auth, stealth) so cream/tan/green tiles no longer
  blast on the dark page bg
- add dark-recolored tinker-bot variant and drop the filter: invert()
  hack on style.css
- swap variants under html.dark via content: url(...) so index.mdx
  stays untouched and light mode is byte-for-byte identical

contrast on #111113: body #EDEEF0 ~16:1, accent #CAB168 ~9:1 (WCAG AAA).
the cream/green/tan card tiles read as framed illustrations on a dark
page, not as page leakage. keeping them aligns with how the kernel.sh
brand handles illustrations (always light surface) and avoids the
visual inconsistency of charcoal-everything-except-chromium-green.

tinker-bot keeps its dark-recolored variant: it's a flat silhouette
with no card frame, so it actually disappears against #111113 — that
swap is a readability fix, not a brand call.
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 30, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Kernel 🟢 Ready View Preview May 30, 2026, 3:25 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

…ewrite

mintlify rewrites img srcs at deploy time to a cdn url with query params
(/{deployment}/{hash}/images/tinker-bot.svg?fit=max&auto=format&...), so
the prior [src$="..."] suffix selector never matched in production and
the dark recolor swap silently no-op'd. [src*="..."] handles both raw
and rewritten srcs.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk assessment: Low risk.

This PR changes the Mintlify docs site's appearance configuration, adds dark-mode-only CSS overrides, and adds SVG assets for the dark logo/tinker-bot. The default theme remains light, the changes are confined to documentation presentation, and there are no production code, infrastructure, auth, data, or shared-library changes.

I found no CODEOWNERS file in the repo and no existing approval, so approving under the Low-risk rule.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

dark mode foundation was off-system. swap to the canonical kernel tokens:

- background color #111113 -> #212225 (kernel charcoal / grey-dark-03,
  the brand's canonical dark background)
- white-alpha rgba(255,255,255,...) -> grey-dark-12 alpha rgba(237,238,240,...)
  across table fills, borders, hovers, and the tinker-box border (kernel
  brand book lists white as "rare; prefer beige/grey-dark-12")
- pricing button border #fff -> #EDEEF0 (grey-dark-12)

wcag aaa still holds on the new bg: body 13.7:1, gold 7.57:1, green 6.35:1.

intentionally untouched in this commit:
- the comment reference to #111113 in the hero-bot rule (stale but
  cosmetic; will sweep separately if needed)
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk assessment: Low risk.

The current diff is limited to Mintlify docs presentation: docs.json theme configuration, dark-mode CSS overrides in style.css, and SVG assets for dark-mode imagery/logos. The update since the prior approval only adjusts dark background/border token values and does not expand the touched surface area.

I found no CODEOWNERS file in the repo. The PR is already approved, so I’m leaving the existing approval in place rather than adding another approval.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

the hero-bot rule's explanatory comment still referenced #111113 after
the brand-alignment swap to #212225. cosmetic only, no behavior change.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk assessment: Low risk.

The current diff is limited to the Mintlify docs site's presentation layer: docs.json theme/logo/background configuration, dark-mode CSS overrides in style.css, and static SVG assets for dark-mode logo/hero imagery. There are no production application code, infrastructure, auth, data, or shared-library changes. The latest synchronize update only changes a CSS explanatory comment, so it does not increase risk from the prior assessment.

I found no CODEOWNERS file in the PR head. The PR is already approved, so I’m leaving the existing approval in place rather than approving again.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

the existing style.css uses single-line terse comments
(/* table headers */, /* tinker box responsive layout */). the dark-mode
block had multi-line essay comments restating what the selectors already
say. cropped to match.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk assessment: Low risk.

The current diff is limited to the Mintlify docs site's presentation layer: docs.json theme/logo/background configuration, dark-mode CSS overrides in style.css, and static SVG assets for dark-mode logo/hero imagery. There are no production application code, infrastructure, auth, data, or shared-library changes.

The latest synchronize update only shortens CSS comments in style.css, so it does not increase risk from the existing approval. I found no CODEOWNERS file in the repo. The PR is already approved, so I’m leaving the existing approval in place rather than approving again.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant