Skip to content

Conversation

@kylecarbs
Copy link
Member

Summary

Replaces ~90 common hardcoded hex colors with Tailwind semantic color utilities to improve consistency and maintainability.

Changes

Extended Tailwind Theme

Added 16 semantic color variables to @theme in globals.css:

  • Text colors: muted, text-dim, text-light, text-lighter, text-subdued
  • Background colors: bg-dark, bg-darker, bg-hover, separator, modal-bg
  • Border colors: border-light, border-medium
  • Accent colors: accent, accent-dark
  • Status colors: success, danger

Replaced Colors Across 43 Files

High-impact files:

  • ReviewPanel.tsx (30 colors → semantic utilities)
  • ProjectSidebar.tsx (26 colors → semantic utilities)
  • CostsTab.tsx, GitStatusIndicatorView.tsx, FileTree.tsx
  • Plus 38+ other component files

Common Mappings

text-[#888]     → text-muted
text-[#ccc]     → text-foreground
bg-[#1e1e1e]    → bg-bg-dark
bg-[#2a2a2b]    → bg-bg-hover
border-[#3e3e42] → border-border-light
text-[#007acc]  → text-accent

Before/After

  • Before: 303 hardcoded hex colors across codebase
  • After: ~215 remaining (intentional/semantic-specific)
  • Reduction: ~30% of generic UI colors centralized

Remaining Colors

~215 hex colors remain intentionally:

  • Syntax highlighting colors (#569cd6, #f48771)
  • Git indicator colors in functions
  • Context-specific semantic colors (#ff5555 for delete, #ffc107 for warnings)
  • Chart/visualization colors

Benefits

✅ Single source of truth for common UI colors
✅ Consistent semantic naming across codebase
✅ Theme-ready architecture
✅ Type-safe with Tailwind autocomplete
✅ Reduced cognitive load for developers

Testing

  • ✅ TypeScript compilation passes
  • ✅ All 43 modified files compile without errors
  • ✅ No functional changes

Generated with cmux

- Add 16 semantic color variables to @theme in globals.css
  - Text colors: muted, text-dim, text-light, text-lighter, text-subdued
  - Background colors: bg-dark, bg-darker, bg-hover, separator, modal-bg
  - Border colors: border-light, border-medium
  - Accent colors: accent, accent-dark
  - Status colors: success, danger

- Replace ~90 common hardcoded hex colors across 43 files
  - ReviewPanel.tsx (30 colors), ProjectSidebar.tsx (26 colors)
  - CostsTab, GitStatusIndicatorView, FileTree, AIView, and 38+ more

- Update global styles (tooltips, markdown, plan content) to use CSS variables

- Remaining ~215 colors are intentional (syntax highlighting, git indicators, etc.)

Benefits:
- Single source of truth for common UI colors
- Consistent semantic naming
- Theme-ready architecture
- ~30% reduction in hardcoded colors

Generated with `cmux`
@kylecarbs kylecarbs merged commit 87c5b74 into main Oct 23, 2025
13 checks passed
@kylecarbs kylecarbs deleted the tailwind-consistency branch October 23, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant