Skip to content

feat(code): upgrade Tailwind CSS v3 to v4#1540

Merged
adamleithp merged 1 commit intomainfrom
devex/upgrade-tailwind-v4
Apr 8, 2026
Merged

feat(code): upgrade Tailwind CSS v3 to v4#1540
adamleithp merged 1 commit intomainfrom
devex/upgrade-tailwind-v4

Conversation

@adamleithp
Copy link
Copy Markdown
Contributor

@adamleithp adamleithp commented Apr 7, 2026

Summary

  • Upgrades Tailwind CSS from v3 (PostCSS) to v4 (@tailwindcss/vite plugin)
  • Uses @config to preserve the existing tailwind.config.js with radix-themes-tw preset — no theme migration needed
  • Imports Radix Themes CSS via @layer radix with explicit layer ordering (theme < base < radix < components < utilities) so Radix component styles override Tailwind's preflight reset while Tailwind utilities can still override Radix
  • Removes autoprefixer and postcss.config.js (both built into v4)

Test plan

  • Dark mode renders correctly (sidebar text, diff view, chat input)
  • Light mode renders correctly (orange accent, greenish-gray sidebar)
  • Toggle between light/dark mode works
  • Radix UI components have correct padding/spacing (rt-r-* classes)
  • Tailwind utility classes (text-gray-11, bg-accent-4, etc.) apply correctly
  • Storybook builds and renders

🤖 Generated with Claude Code

Upgrade Tailwind CSS from v3 to v4 using the @tailwindcss/vite plugin
instead of PostCSS. Uses @config to preserve the existing tailwind.config.js
with radix-themes-tw preset, avoiding a full theme migration.

Key changes:
- Replace PostCSS plugin with @tailwindcss/vite in renderer and Storybook
- Replace @tailwind directives with @import "tailwindcss" + @config
- Import Radix Themes CSS via @layer for proper cascade ordering
- Move Radix CSS import from main.tsx to globals.css
- Remove autoprefixer (built into v4)
- Delete postcss.config.js (no longer needed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@adamleithp adamleithp merged commit e55079e into main Apr 8, 2026
15 checks passed
@adamleithp adamleithp deleted the devex/upgrade-tailwind-v4 branch April 8, 2026 01:43
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.

2 participants