feat(styles): primitive color layer and JS color guardrails - #57
Merged
Merged
Conversation
colors.css now holds the brand primitives under @theme static and registers the semantic tokens; semantic.css light/dark values reference primitives only. A new app changes the primitives and nothing else. @theme static keeps variables that only JS reads in the bundle, so the tab bar drops its fallback hex. Tab label colors become tokens read with useCSSVariable so they follow the theme. ESLint now fails on hex literals and Uniwind.getCSSVariable under src/; remaining example screens are listed in LEGACY_HEX_FILES. The prompt hook routes color questions to docs/colors-in-js.md, which records the decision, the light-only variant, and the rejected alternatives. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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 values now live only in
src/styles/tokens.colors.cssholds brand primitives under@theme staticand registers the semantic tokens;semantic.csslight/dark blocks reference primitives only. Tab label colors become tokens read throughuseCSSVariable, and the tabs layout drops its fallback hex since static variables always exist.Guardrails: ESLint fails on hex literals and
Uniwind.getCSSVariableundersrc/(example screens listed inLEGACY_HEX_FILES), and the prompt hook routes color questions todocs/colors-in-js.md.Verified:
check-allgreen (59 tests), Android export keeps the JS-only variables in the bundle.🤖 Generated with Claude Code