You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(web): dark-mode contrast pass — kill white slabs, add book theme
Several legacy components used hardcoded rgba(255,255,255,X) backgrounds
instead of token variables, producing opaque white slabs on the dark
canvas (the .glass-card was the most visible offender — every card on
the home page rendered white-on-dark in dark mode). Adds defensive
overrides for all such surfaces and brings dark-mode parity to the
book pages.
## Main site (web/css/redesign-v24.css)
Adds dark-mode overrides for:
- .glass-card (the universal card shell — fixes init phases, problem
cards, bento cards, FAQ items, audience cards, install code blocks)
- .top-nav.scrolled and .top-nav.open (sticky nav had hardcoded white)
- .install-tab.active (sticky install tab bar)
- .cmd-card (commands grid)
- blockquote
- v2.4 redesign components (persona-card, vs-table-wrap, vs cells,
playground container/tabs/foot, hero-extras, theme-toggle)
- .btn-secondary / .btn-tertiary
- Hero stat divider/num/label readability
- .section-glow opacity boost
- .section-label color in dark
## Book pages (web/book/css/book.css)
The book had no dark-mode support at all — adds the full token palette
plus overrides for:
- .header-bar / .top-nav-book (sticky bar)
- .copy-btn (code-block copy buttons — line 669 of book.css had
hardcoded white)
- pre / code / chapter content
- Sidebar / TOC / chapter-nav
- Tables, blockquote, callouts
- Scrollbar + selection
- Theme toggle button (with positioning + dark/light icon swap)
## Theme bootstrap injected site-wide
All 26 book pages and 2 ancillary web pages (what-is-draft, changelog)
now include:
- The early-apply theme bootstrap in <head> (prevents FOUC)
- The theme-toggle.js script before </body>
- changelog and what-is-draft also pick up redesign-v24.css for the
shared toggle button styling
Path resolution computed correctly: ../js/theme-toggle.js for book
root + ancillary pages, ../../js/theme-toggle.js for chapters.
## Verification
- make build: 28 skills, 21,168 lines, OK
- make test: 25 suites, all green
- curl smoke: dark-mode rule counts (51 in main, 41 in book), theme
bootstrap present in book pages, JS reachable from all paths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments