Repository navigation
feat(website/design): semantic design-token system, collapse legacy color tokens - #714
Conversation
…olor tokens Replace the duplicated legacy tokens (--color-primary/surface/elevated, --color-accent-*, --color-bg-*, --color-text-*, --color-link) with one semantic set defined on :root (dark) and html.light (light): --bg, --bg-raised, --bg-overlay, --fg, --fg-muted, --fg-subtle, --border, --brand, --brand-fg, --accent, --accent-fg, --accent-warm, --danger, --ok. @theme inline maps them to Tailwind utilities that reference the runtime variables, so light mode now switches through the variables instead of per-class !important overrides. Every legacy class usage is migrated and the html.light overrides that targeted them are deleted. Also fixes light-mode contrast failures found while auditing the 8 key routes: navbar background stuck dark, invisible prose <strong>, playground title, VS Code settings block, dialect/status badges and playground status text now use tokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9
|
Deployment failed for project gosqlx-website with the following error: Learn More: https://vercel.com/coolajitpratapsingh0-9932s-projects?upgradeToPro=build-rate-limit |
|
Claude finished @ajitpratap0's task in 24s —— View job Review of PR #714: semantic design-token system
SummaryThis is a good refactor. Moving to Findings1. Remaining raw 2. Mobile menu uses 3. 4. Code-block token restoration is incomplete. (low) 5. Hardcoded values remain in the override layer. (nit) 6. Tests. (info) VerdictNo blocking issues. The main follow-ups are items 1 and 4. The Go library is untouched, so there is no performance or security impact. The only runtime change is a lighter Navbar, because the |
Fenced code blocks in light mode got a white code background behind forced light text (~1.4:1). Restrict bg-bg-raised to inline code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9
|
Fixed the light-mode fenced code regression in 🤖 Generated with Claude Code |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @ajitpratap0's task in 37s —— View job Review of PR #714: semantic design-token systemI read the diff for Overall: the approach is sound. Findings
No Go library, performance or security impact. The Navbar is slightly lighter now that the |
Summary
Implements the semantic design-token system from plan section 7 (issue #659).
website/src/app/globals.cssnow defines--bg,--bg-raised,--bg-overlay,--fg,--fg-muted,--fg-subtle,--border,--brand,--brand-fg,--accent,--accent-fg,--accent-warm,--dangerand--okon:root(dark) andhtml.light(light).color-schemeis set per theme.@theme inlinemaps each token to--color-*asvar(--token), so utilities (bg-bg,bg-bg-raised,text-fg-subtle,bg-brand,text-accent,bg-accent/10,text-danger, ...) follow the theme at runtime. The old@theme inlinehex values never reached utilities in light mode, which is why light mode needed the per-class override layer.--color-primary/surface/elevated,--color-accent-indigo/orange/green/purple,--color-bg-*,--color-text-*,--color-link,--color-border-*,--color-brand-hover. All usages were grepped and migrated first:text-text-muted->text-fg-subtle(49 uses)*-accent-indigo/*-accent-purple->*-accent*-accent-green->*-brand*-accent-orange->*-accent-warmbg-primary/bg-[#09090b]->bg-bg,bg-surface->bg-bg-raisedtext-accent-fg(white on#818CF8was about 2.9:1)rg 'accent-(indigo|green|orange|purple)|text-text-|bg-primary|bg-surface\b|--color-(primary|surface|elevated|bg-|text-|link)'returns nothing underwebsite/src.html.lightoverrides deleted for everything that now runs on tokens: the token override block, thetext-text-mutedpatch, body colours,.bg-primary/.bg-surface, version badge, alltext-accent-*/bg-accent-*/10rules, thepre .text-accent-*rules, prose colour overrides, the light focus-ring override and the light inline-code override. Code blocks that stay dark in light mode get the dark token values onhtml.light pre, so they need no per-class rules. The remaining overrides only cover raw zinc/slate/white palette classes; they are marked to be deleted as those components move to tokens.useTransformclosure captured a staleisLight). It now usescolor-mix(var(--bg) ...), and the MutationObserver is gone.<strong>was white on white (about 1.04:1) on every docs page becauseprose-invertbold/counters/bullets/quotes/borders were never themed. They are now token-driven.<h1>(text-slate-100, about 1.01:1), the VS Code settings<pre>, the dialect showcase avatars and status badges, the benchmarks "GoSQLX" pill, MiniPlayground links and the playground status text (green-400/red-400->text-ok/text-danger) were moved to tokens.--fg-subtleis#5B6472(#6B7280is below 4.5:1 on--bg-overlay), light--okis#166534and light--accent-warmis#9A3412(the plan values drop below 4.5:1 on 10% tinted badges).CHANGELOG.md is intentionally not edited (the release is being prepared in another session). Suggested entry under Unreleased / Website: "Semantic design-token system; legacy colour tokens and most light-mode override CSS removed; light-mode contrast fixes (navbar, docs bold text, playground header)."
Token contrast (WCAG 2.x, computed)
Text pairs need 4.5:1. The accent focus ring and UI need 3:1.
--borderhairlines are decorative separators (WCAG 1.4.11 does not apply to them), so they are not listed.--fg--bg--fg--bg-raised--fg--bg-overlay--fg-muted--bg--fg-muted--bg-raised--fg-muted--bg-overlay--fg-subtle--bg--fg-subtle--bg-raised--fg-subtle--bg-overlay--brand--bg--brand--bg-raised--brand--bg-overlay--accent--bg--accent--bg-raised--accent--bg-overlay--accent-warm--bg--accent-warm--bg-raised--accent-warm--bg-overlay--danger--bg--danger--bg-raised--danger--bg-overlay--ok--bg--ok--bg-raised--ok--bg-overlay--brand-fg--brand--accent-fg--accent--accent--bg--fg--bg--fg--bg-raised--fg--bg-overlay--fg-muted--bg--fg-muted--bg-raised--fg-muted--bg-overlay--fg-subtle--bg--fg-subtle--bg-raised--fg-subtle--bg-overlay--brand--bg--brand--bg-raised--brand--bg-overlay--accent--bg--accent--bg-raised--accent--bg-overlay--accent-warm--bg--accent-warm--bg-raised--accent-warm--bg-overlay--danger--bg--danger--bg-raised--danger--bg-overlay--ok--bg--ok--bg-raised--ok--bg-overlay--brand-fg--brand--accent-fg--accent--accent--bgTest Plan
cd website && npm ci && npm run typecheck && npm run lint && npm run build: typecheck clean, lint 0 errors (7 existing warnings), build OK (105 static pages). The build was run clean (rm -rf .next) because a stale Turbopack cache had served old CSS..text-fg-subtle{color:var(--fg-subtle)}and.bg-accent\/10{background-color:color-mix(in oklab,var(--accent) 10%,transparent)}).next startfor the 8 routes (/,/docs/,/docs/getting-started/,/playground/,/blog/,/benchmarks/,/compare/,/vscode/), in light and dark (16 runs).<strong>(1.04), the playground title (1.01) and dialect avatars (1.76)./docs/getting-started/and/playground/reviewed: the navbar is light in light mode, badges are readable and code blocks stay dark..github/workflows/lighthouse.yml) on this PR.Breaking Changes
None for the Go library or public site URLs. For website contributors only: the legacy Tailwind colour utilities (
text-accent-indigo,text-text-muted,bg-primary,bg-surface, ...) no longer exist. Use the semantic ones (text-accent,text-fg-subtle,bg-bg,bg-bg-raised, ...). Open PRs that add legacy classes will need a rebase and rename.Closes #659
Part of #634
🤖 Generated with Claude Code
https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9