Converted CSS variables to Tailwind 4 theme variables#432
Converted CSS variables to Tailwind 4 theme variables#432maurer2 wants to merge 1 commit intoTanStack:mainfrom
Conversation
📝 WalkthroughWalkthroughThe changes implement a systematic refactor of CSS custom property naming conventions and Tailwind styling patterns. All CSS theme variables are renamed from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Hello, when scaffolding a router project, the generated React app uses JSX with the older arbitrary value syntax of Tailwind for CSS variables in the templates.
Tailwind 4 provides a simpler approach via theme variables defined in
@theme, which can also be used directly in JSX when correctly namespaced (e.g.color-for colours,spacing-for margin and padding etc.).This approach is more concise and looks arguable cleaner.
I updated the following tokens:
border-[var(--line)]→border-linetext-[var(--sea-ink)]→text-sea-inktext-[var(--sea-ink-soft)]→text-sea-ink-softbg-[var(--header-bg)]→bg-header-bgborder-[var(--chip-line)]→border-chip-linebg-[var(--chip-bg)]→bg-chip-bghover:bg-[var(--link-bg-hover)]→hover:bg-link-bg-hovertext-[var(--lagoon-deep)]→text-lagoon-deepCheers
Summary by CodeRabbit