Commit 9f2330f
authored
docs: enable dark mode behind theme toggle (default stays light) (#391)
* feat(docs): enable dark mode (toggle on, default stays light)
- 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
* polish(docs): dark-mode card + hero illustrations
- 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).
* revert(docs): keep homepage card illustrations light on dark page
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.
* fix(docs): match tinker-bot src as substring to handle mintlify cdn rewrite
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.
* align(docs): swap dark-mode values to kernel brand tokens
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)
* docs(style): update stale comment to reflect new charcoal bg
the hero-bot rule's explanatory comment still referenced #111113 after
the brand-alignment swap to #212225. cosmetic only, no behavior change.
* deslop: shrink dark-mode comments to match existing file style
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.
* feat(docs): brand-align warning callout in dark mode
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.
* deslop: shrink warning callout comment to single-line WHAT
matches the existing single-line comment style in the file
(/* tinker box border */, /* hero bot dark recolor */, etc).
* docs(brand): rename logo/light.svg to logo/white.svg
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.
* address review nits on dark mode warning callout + alpha consistency
- 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 renamed1 parent 4351b22 commit 9f2330f
4 files changed
Lines changed: 68 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
360 | 363 | | |
361 | 364 | | |
362 | | - | |
| 365 | + | |
| 366 | + | |
363 | 367 | | |
364 | 368 | | |
365 | 369 | | |
| |||
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
0 commit comments