Skip to content

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

Merged
jarugupj merged 11 commits into
mainfrom
phani/dark-mode-enable
Jun 14, 2026
Merged

docs: enable dark mode behind theme toggle (default stays light)#391
jarugupj merged 11 commits into
mainfrom
phani/dark-mode-enable

Conversation

@jarugupj

@jarugupj jarugupj commented May 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Enables the Mintlify theme toggle so docs readers can switch to dark mode, with all dark-mode values aligned to the Kernel brand system. Default appearance stays light — first-time visitors see no change, the toggle is opt-in.

Brand alignment

Every value introduced by this PR maps to a token in the Kernel design system:

  • Background: #212225 (kernel grey-dark-03 / charcoal)
  • Foreground: #EDEEF0 (kernel grey-dark-12) — used for body text, logo, and the tinker-bot illustration
  • Accent: #CAB168 (kernel gold) — kept unchanged across both modes, also used for the Warning callout icon
  • Table/box tints: rgba(237, 238, 240, …) — grey-dark-12 at low opacity (brand book lists white as "rare; prefer beige/grey-dark-12")

WCAG AAA contrast on #212225: body 13.7:1, gold 7.57:1, green 6.35:1.

Proposed brand extension (flagging for design review)

The dark-mode subtle-surface tints (6 alpha steps: 0.02 / 0.03 / 0.04 / 0.08 / 0.10 / 0.14) form a "surface depth" scale used on table fills, borders, the tinker-box edge, and the Warning callout panel. These alphas are not on the brand book's defined opacity scale (0, 32, 64, 100) — but that scale was written for CSS opacity utility classes (like opacity-32), not for alpha values inside rgba() colors. Arguably a different concept.

This PR ships the scale as a proposed extension to the brand system. Recommend ratifying it as named tokens (e.g. --surface-overlay-01..05) in kernel/website so docs + dashboard can share the same scale.

Changes

  • docs.jsonappearance.strict: false, dark logo + dark background #212225.
  • logo/white.svg#EDEEF0 recolor of the existing logo (paths identical to black.svg) used in dark mode. Filename matches the brand book's "white monochrome" variant terminology.
  • style.csshtml.dark-scoped overrides for tables, the .tinker-box border, the pricing button border, and the Warning callout. Light mode rules untouched.
  • images/tinker-bot-dark.svg + one CSS swap — the hero bot is a flat #1C2024 silhouette that disappears against the dark page bg, so it gets a #EDEEF0 recolor via content: url(). Selector uses src*= to handle the Mintlify CDN's image URL rewriting in production.

Warning callout polish

Mintlify's default Warning renders as bright yellow on amber-brown — Eric flagged it as "harsh on the eyes." This PR brings the panel + border + icon in-line with the brand:

  • panel bg/border → grey-dark-12 alpha tints (matches table treatment)
  • icon color → kernel gold #CAB168 (the brand's only approved warm accent)
  • body text → unchanged (Mintlify default applies — see "Inherited Mintlify defaults" below)

Note: the brand book reserves gold for "premium/enterprise" contexts. Using it on a Warning icon is a slight stretch of that intent. Gold is still being used as an accent (not a fill), which the brand rule explicitly allows.

Inherited Mintlify defaults (unchanged in this PR)

The following are Mintlify default renderings, not introduced by this PR. They've been on prod for months (visible in light mode) and aren't managed by our style.css overrides:

  • Note / Info callouts — Mintlify's Tailwind blue palette for panel bg, border, and icon
  • Tip callouts — Mintlify's Tailwind green palette for panel bg, border, and icon
  • Callout body text color — Mintlify color-codes text per callout type (Warning pastel yellow, Note/Info pastel blue, Tip pastel green)

A strict brand reading would override these to kernel tokens. We left them at the Mintlify default — same as light mode in prod, and keeps PR scope tight. Happy to push overrides if reviewers want strict treatment.

Notes

  • Default stays light by design. This PR only restores the toggle; it does not flip the default. That's a separate brand call.
  • Homepage card illustrations intentionally keep their light tiles on dark. They read as framed illustrations (same pattern Stripe, Linear, Notion use) and preserve the cream brand vibe. 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.
  • Toggle stays at the Mintlify default location (bottom of sidebar). Considered moving it to the top-right navbar but Mintlify has no native support for that, and the CSS-hack path proved fragile against their internal DOM. Captured as a follow-up.

Test plan

  • Toggle dark on the Mintlify preview across Guides, API Reference, CLI, MCP, Changelog
  • Tables + code blocks readable in dark
  • Warning callout (/browsers/gpu-acceleration) no longer reads as "yellow on brown"
  • Note / Info / Tip callouts unchanged (Mintlify default, same as light mode)
  • Light mode unchanged (identical to before)
  • Mobile/narrow viewport in dark mode

Note

Low Risk
Documentation-only theming and static assets; no runtime APIs, auth, or data paths. Risk is mainly visual regressions if Mintlify changes callout class names.

Overview
Enables opt-in dark mode on the Mintlify docs by setting appearance.strict to false while keeping default: light, so first-time visitors still see the current experience.

Brand-aligned dark shell: docs.json now uses light/dark logos (black.svg / new white.svg) and a dark page background #212225. New images/tinker-bot-dark.svg plus a html.dark CSS swap keeps the homepage hero bot visible on charcoal.

Dark-only styling in style.css: tables, .tinker-box borders, pricing --btn-border, and yellow Warning callouts get grey-dark-12 alpha tints and gold icon color; light-mode rules are untouched.

Reviewed by Cursor Bugbot for commit c2c2cb6. Bugbot is set up for automated code reviews on this repo. Configure here.

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

mintlify Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

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.
cursor[bot]
cursor Bot approved these changes May 30, 2026
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)

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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

mintlify's default warning renders as bright yellow on amber-brown, all
non-kernel-palette colors. eric flagged it as "harsh on the eyes."

swap to:
- panel bg/border: grey-dark-12 alpha tints (matches our table treatment)
- icon: kernel gold #CAB168 (the brand's only approved warm accent)

light mode unchanged. only the yellow Warning class is targeted —
Note/Info (blue) and Tip (green) stay mintlify-default for now.

note: text color inside the callout still uses mintlify's #9F9F9F since
no kernel token cleanly matches a dark-mode mid-gray. follow-up to
formalize a dark-mode neutral text token in BRAND.md.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk assessment: Low risk.

I re-evaluated the current diff (f02e46f...0ac9d4b) from the changed files and hunks only. The PR is still limited to Mintlify docs presentation changes: docs.json theme/logo/background configuration, dark-mode CSS overrides in style.css, and static SVG assets for dark-mode imagery. There are no production application code, infrastructure, auth, permissions, data, or shared-library changes.

I found no CODEOWNERS file in the PR head, and docs.json validates as JSON. 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

matches the existing single-line comment style in the file
(/* tinker box border */, /* hero bot dark recolor */, etc).

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk assessment: Low risk.

I re-evaluated the current diff (f02e46f...470caf9) from the changed files and hunks only. The PR remains confined 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 the dark logo and tinker-bot. There are no production application code, infrastructure, auth, permissions, data, or shared-library changes.

I found no CODEOWNERS file in the repo. The PR is already approved, and this synchronize update does not increase risk, 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 dark-mode logo is the brand book's "white monochrome" variant.
naming it light.svg made docs.json line read "dark": "/logo/light.svg",
which clashes with the eye. rename closes the cognitive nit and aligns
the file name with the brand book's own terminology.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk assessment: Low risk.

I re-evaluated the current diff (f02e46f...51766d) from the changed files and hunks only. The PR remains limited to Mintlify docs presentation changes: docs.json enables the theme toggle/default-light logo/background configuration, style.css adds dark-mode visual overrides, and the new SVG files provide dark-mode static assets. There are no production application code, infrastructure, auth, permissions, data, or shared-library changes.

I found no CODEOWNERS file in the repo. The PR is already approved and this update does not increase risk, 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

@jarugupj jarugupj marked this pull request as ready for review June 3, 2026 20:27
@firetiger-agent

Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

PRs in the kernel, infra, hypeman, and hypeship repos. kernel is a ~mono repo with many logical services underneath, ensure to focus on the implicated service for the PR

Reason: This PR modifies documentation styling (dark mode theme for docs site) which is not a service-level change requiring deploy monitoring; clarify if this impacts a monitored service like kernel's website infrastructure.

To monitor this PR anyway, reply with @firetiger monitor this.

@jarugupj jarugupj requested a review from masnwilliams June 3, 2026 20:27

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk assessment: Low risk.

I assessed the current diff (f02e46f...51766d) from the changed files and hunks only. The PR remains limited to Mintlify documentation presentation: docs.json enables a non-strict theme toggle while keeping the default light theme, style.css adds dark-mode visual overrides, and the new SVG files are static dark-mode assets. There are no production application code, infrastructure, auth, permissions, data, or shared-library changes.

I found no CODEOWNERS file in the repo, and docs.json parses successfully as JSON. The PR is already approved, and this update does not increase risk, 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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 51766d4. Configure here.

Comment thread style.css
}
html.dark .callout[class*="yellow"] svg {
color: #CAB168 !important;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning callout selector misses amber

Medium Severity

Dark-mode Warning callout overrides use a selector that matches class names containing yellow, but Mintlify’s Warning callout is styled with Tailwind amber utility classes. Those rules never apply, so Warning panels and icons keep Mintlify’s default harsh amber styling in dark mode instead of the intended brand tints and gold icon.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 51766d4. Configure here.

@masnwilliams masnwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

reviewed — looks good, ships clean. light mode is untouched (all overrides are html.dark-scoped), and i verified both new SVGs are fill-only recolors of the existing black.svg / tinker-bot.svg (identical path geometry). couple of non-blocking notes:

nits

  • style.css:223 — the warning-callout fix keys off [class*="yellow"], a substring match on mintlify's internal class names. if they rename/hash those classes the override silently stops applying and the callout reverts to the harsh default with no error. brittle by necessity, worth a heads-up comment.
  • style.css:186,195 vs :225 — alpha written as 0.1 in some rules and 0.10 in others (same value). standardizing on 0.10 would match the "surface depth scale" in the PR description.
  • logo/white.svg — fill is #EDEEF0, not literal white; name follows the brand-book "white monochrome" term per the description, so fine — just flagging the name/color mismatch.

approving — nothing blocking.

- standardize alpha values to 2-decimal form (0.1 → 0.10) so the
  surface depth scale reads uniformly (0.02 / 0.04 / 0.08 / 0.10 / 0.14)
- add comment above warning callout block noting the selector depends
  on mintlify's yellow-* tailwind classes and silently no-ops if renamed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk assessment: Low risk.

I evaluated the current diff (f02e46f...c2c2cb6) from the changed files and hunks. The PR remains limited to Mintlify docs presentation changes: docs.json enables the theme toggle while keeping light as the default, style.css adds dark-mode styling overrides, and the new SVG files are static dark-mode assets. There are no production application code, infrastructure, auth, permissions, data, or shared-library changes.

The latest update since the existing approval only standardizes CSS alpha formatting and expands a comment about a brittle Mintlify selector, so the risk level has not increased. I found no CODEOWNERS file in the PR head, and docs.json parses as valid JSON. The PR is already approved, so I’m not adding another approval.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@jarugupj jarugupj merged commit 9f2330f into main Jun 14, 2026
4 checks passed
@jarugupj jarugupj deleted the phani/dark-mode-enable branch June 14, 2026 03:55
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.

2 participants