chore: add design system token layer and migrate hardcoded values#485
Open
chore: add design system token layer and migrate hardcoded values#485
Conversation
Establish a three-layer token architecture so all UI code references semantic CSS variables instead of raw hex/rgb values, preventing visual drift and making theme changes propagate automatically. - Create specs/design-system/ with foundation specs, component specs, and a tokens.css file defining Layer 1 (primitives) and Layer 2 (semantic aliases) - Add scripts/token-audit.js that scans CSS and component files for hardcoded visual values, suggests the correct token, and exits with code 1 if errors are found (CI-ready) - Replace 98 hardcoded color violations across 18 files with var() token references (hub surfaces, accent green, badge blues, palette fallbacks, SVG fills) - Centralize the project/tag COLOR_PALETTE into keeperhub/lib/palette.ts and import from the three files that duplicated it - Add design system usage rules to CLAUDE.md
🚀 PR Environment DeployedYour PR environment has been successfully deployed! Environment Details:
Components:
The environment will be automatically cleaned up when this PR is closed or merged. |
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.
Summary
scripts/token-audit.js) that scans for hardcoded visual values, suggests the correct token, and exits non-zero on errors -- 98 errors resolved to reach zero across 18 filesTest plan
node scripts/token-audit.js-- should report 0 errors (74 warnings expected)pnpm buildsucceeds with no type errors