-
Notifications
You must be signed in to change notification settings - Fork 11
π€ Consolidate theme variables to Tailwind native colors #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reduced custom CSS variables from 146 to 31 (79% reduction) by migrating to
Tailwind's native color system.
## Changes
### Removed (115 variables)
- 50+ gray variants β Tailwind gray-100 through gray-950
- 7 accent blue variants β Tailwind sky-{400,500,600,700,800}
- 40+ unused colors (toasts, overlays, review backgrounds)
### Kept (31 semantic variables)
- Mode colors: plan, exec, edit, editing, thinking, debug (17 vars)
- Status: interrupted, review-accent, git-dirty, pending (4 vars)
- Special: code-bg, user-border, assistant-border (3 vars)
- Tokens: input, output, cached (3 vars)
- Errors: error, error-bg, error-bg-dark (3 vars)
- Alpha: plan-mode-alpha, editing-mode-alpha (2 vars)
### Files Updated
- globals.css: -114 lines (replaced var() with @apply and theme())
- 60 component files: replaced custom classes with Tailwind equivalents
- text-muted β text-gray-500
- text-foreground β text-gray-200
- bg-dark β bg-gray-950
- border-border β border-gray-800
- text-accent β text-sky-600
## Benefits
- Simplified color system using standard Tailwind scale
- Better developer experience with documented color classes
- Easier theming via Tailwind's built-in system
- Reduced maintenance burden (79% fewer variables)
_Generated with `cmux`_
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Replace text-gray-200-dim with text-gray-400 - Replace text-gray-500-dark with text-gray-600 - Replace all bg-accent* with bg-sky-* - Replace bg-muted-dark with bg-gray-600 - Replace border-dark with border-gray-950
- Fix bg-bg-gray-950 β bg-gray-950 in App.tsx - Fix hover:bg-bg-subtle β hover:bg-gray-800 - Fix text-lighter β text-gray-100 - Fix border-hover β border-gray-900 - Fix text-message-header β text-gray-300
Tailwind's gray scale has a blue undertone. The original theme used pure neutral grays hsl(0 0% X%) with no color tint. Switching to Tailwind's 'neutral' palette which matches the original neutral appearance.
- text-neutral-200 β text-neutral-300 (main text, closer to original 83% lightness) - text-neutral-600 β text-neutral-500 (secondary text) - text-neutral-500 β text-neutral-400 (muted text) - Brighten scrollbar colors to match
Original used hsl(0 0% 12%) (~#1f1f1f, 12% lightness) neutral-950 is too dark (~5% lightness) neutral-900 (~15% lightness) is closer to original
5e4983d to
d06db2a
Compare
- Sidebars: neutral-900 β neutral-800 (lighter) - Chat input area: neutral-900 β neutral-800 (lighter) - Scrollbar: gray β neutral (removes blue tint) - Main message area: kept at neutral-900
Removes blue tint from all theme() calls in CSS
- Use exact HSL values instead of @apply for tooltips - background: hsl(0 0% 18%) - color: hsl(0 0% 83%) - border: hsl(0 0% 27%) - Fix caret to match tooltip background
b3967a0 to
535b249
Compare
- Use exact hex colors for tooltips: #2d2d30 bg, #d4d4d4 text, #464647 border - Fix tooltip caret to use #2d2d30 - Fix workspace base: neutral-800 β neutral-900 (darker) - Selected workspace stays neutral-800 (lighter than base)
d947531 to
f34e7e3
Compare
The sed replacement created malformed className with duplicated 'selected &&' expressions. Fixed to single conditional.
- ProjectSidebar: bg-separator + bg-hover for selected/hover - RightSidebar: bg-separator + border-border-light - LeftSidebar: bg-separator + border-border - Added semantic colors: --color-separator (15%), --color-hover (16.5%) - These match original theme exactly instead of using neutral-800/900
- Message area: bg-neutral-900 β bg-neutral-800 (lighter) - ProjectSidebar collapse border: border-neutral-900 β border-hover (match main)
- Message area: bg-neutral-800 β bg-neutral-950 (darker than sidebars) - ProjectSidebar: bg-sky-600/[0.08] β bg-accent/[0.08] (match main) - Added --color-accent to match main branch pattern
# Conflicts: # src/components/Context1MCheckbox.tsx # src/components/Messages/ChatBarrier/StreamingBarrier.tsx # src/components/ProjectSidebar.tsx # src/components/RightSidebar/CodeReview/FileTree.tsx # src/components/RightSidebar/CodeReview/ReviewControls.tsx # src/components/RightSidebar/CodeReview/ReviewPanel.tsx # src/components/RightSidebar/ConsumerBreakdown.tsx # src/components/RightSidebar/CostsTab.tsx # src/components/RightSidebar/VerticalTokenMeter.tsx # src/components/SecretsModal.tsx # src/components/Tooltip.tsx # src/styles/globals.css
# Conflicts: # src/components/Context1MCheckbox.tsx # src/components/NewWorkspaceModal.tsx # src/components/ThinkingSlider.tsx # src/components/WorkspaceListItem.tsx # src/components/tools/FileReadToolCall.tsx
# Conflicts: # src/components/tools/ProposePlanToolCall.tsx
Reduced custom CSS variables from 146 to 31 (79% reduction) by migrating to Tailwind's native color system.
Changes
Removed (115 variables):
gray-100throughgray-950sky-{400,500,600,700,800}Kept (31 semantic variables):
Files Updated:
globals.css: -152 lines (replacedvar()with@applyandtheme())text-mutedβtext-gray-500text-foregroundβtext-gray-200bg-darkβbg-gray-950border-borderβborder-gray-800text-accentβtext-sky-600Benefits
Testing
Generated with
cmux