Semantic color tokens to enable CSS-variable theming#27
Open
keaganstokoe wants to merge 2 commits intochrysb:mainfrom
Open
Semantic color tokens to enable CSS-variable theming#27keaganstokoe wants to merge 2 commits intochrysb:mainfrom
keaganstokoe wants to merge 2 commits intochrysb:mainfrom
Conversation
Introduce CSS variables (--text-bright, --status-*, --overlay) and a shared tailwind-config.js with Tailwind color aliases backed by those variables. Extract the inline Tailwind configs from login.html and setup.html into the shared file. This layer lets themes override colors in one file instead of touching every component. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Refactor all component files to use semantic color aliases (text-body, text-bright, text-fg-muted, text-fg-dim, bg-field, bg-overlay, text-status-*, bg-status-*-bg, border-status-*-border) instead of raw Tailwind gray/red/yellow/green/cyan classes. Theming now requires overriding CSS variables in theme.css only. Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Problem
~90 component files use hardcoded Tailwind color classes (text-gray-300, bg-red-950/95, border-yellow-700/80, etc.). Adding a light theme or any other styling means touching every file.
What this does
Adds a semantic token layer between components and colors:
Then refactors all component files to use the semantic names instead of raw Tailwind shades.
New CSS variables in theme.css (20 tokens): --text-bright, --overlay, --status-error*, --status-warning*, --status-success*, --status-info*
New Tailwind aliases in tailwind-config.js: body, bright, fg-muted, fg-dim, field, overlay, status.*
Also extracts the inline Tailwind configs from login.html and setup.html into a shared tailwind-config.js file.
What this enables
After this PR, theming the entire UI is one CSS block:
No component files need to change.
Scope
Verification