Color tokens: warm neutral ramps, semantic layer, deprecated aliases#13102
Draft
lokesh wants to merge 2 commits into
Draft
Color tokens: warm neutral ramps, semantic layer, deprecated aliases#13102lokesh wants to merge 2 commits into
lokesh wants to merge 2 commits into
Conversation
…ted aliases - Rewrite static/css/tokens/colors.css into three tiers: primitive ramps (warm neutrals, blue, red/green/amber), semantic tokens (--color-*, the dark-mode seam), and deprecated aliases that re-point every legacy token name so all ~2,100 existing var() consumers shift to the new palette with zero edits. - Brand blues are bit-identical (--blue-500/600 == --primary-blue/--link-blue). - Add tests/unit/js/token-contrast.test.js asserting the WCAG AA contrast matrix over the semantic tokens (runs in npm test). - Add bundlesize budgets for tokens.css (6KB) and ol-components.css (8KB). - Update docs/ai/design.md token documentation (fix nonexistent tokens/typography.css reference). - Remove --beige-bright (zero consumers).
This was referenced Jul 2, 2026
toHaveScreenshot coverage of home/search/book (full page, volatile covers masked) plus header and footer crops, at both Playwright projects (1280x800 and Pixel-5 390x844). Skipped unless OL_VISUAL=1 so it never gates CI; intended for local before/after sweeps of each design-refresh phase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Color token architecture: warm neutral ramps, semantic layer, deprecated aliases
First PR of the visual modernization series. Restructures
static/css/tokens/colors.cssfrom a flat ~110-token legacy palette (17 near-duplicate greys, hex-named tokens, no semantic layer) into the two-tier systemdocs/ai/design.mdpromises:--neutral-50…900, hue 40–45) replacing the grey + beige families; a blue ramp whose 500/600 steps are bit-identical to--primary-blue/--link-blue(zero brand drift); muted red/green/amber status ramps with AA-safe foreground steps.--color-text/-secondary/-muted,--color-background/surface/-sunken/-header,--color-link/-hover/-visited,--color-primaryfamily, borders, and--color-{success,error,warning}-{fg,bg,border}. Every one references a primitive only — this is the dark-mode seam (color-scheme: lightis declared; dark mode ships later by re-pointing this layer).--grey,--beige,--dark-grey, …) re-pointed at the ramps, so all ~2,100 existingvar()consumers pick up the warm palette with zero consumer edits.--beige-brightdeleted (zero consumers).Guardrails
tests/unit/js/token-contrast.test.jsparsescolors.css, resolvesvar()chains, and asserts the WCAG AA matrix (26 assertions: text ≥ 4.5:1 on its surfaces, non-text UI ≥ 3:1). Runs innpm test.tokens.css(6KB) andol-components.css(8KB); currently 2.6KB / 1.5KB gzip.docs/ai/design.mdupdated (also fixes the reference to a nonexistenttokens/typography.css).Verified
npm run lintclean,npx jest495/495, bundlesize budgets pass./, search, work page, login at 1280 & 390 (below).Before / after
Notes for review
--black→ warm inkneutral-900; beiges → lighter paper tints;--goldstars → mutedamber-400; header gradient endpoints → flat paper tints (gradient itself flattens in the foundation-surfaces PR).hsl()literals in component CSS derived from old token values do not shift via aliases; they're re-tokenized in the per-page PRs of this series.🤖 Generated with Claude Code