feat(frontend): migrate to Tailwind CSS v4 (#852, supersedes #686)#858
Merged
Conversation
Switch from Tailwind v3 + PostCSS plugin to Tailwind v4 with the dedicated Vite plugin (@tailwindcss/vite). Remove autoprefixer and postcss since v4 handles both automatically. Config changes: - vite.config.ts: add @tailwindcss/vite plugin - postcss.config.js: emptied (no longer needed) - tailwind.config.js: deleted; theme migrated to CSS-first @theme {} block in src/index.css with the brand color palette CSS entry: - src/index.css: replace @tailwind directives with @import "tailwindcss" and inline @theme { --color-brand-* } tokens Utility class renames per the v4 upgrade guide: - shadow-sm → shadow-xs (106 occurrences) - outline-none → outline-hidden (114 occurrences, preserves forced-colors accessibility behaviour) - flex-shrink-0 → shrink-0 (114 occurrences) Closes #852
Coverage Report✅ 85.5% on Gate passed |
Coverage Report✅ 85.5% on Gate passed |
3 tasks
Coverage Report✅ 85.9% on Gate passed |
Coverage Report✅ 85.9% on Gate passed |
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.
Summary
tailwindcssfrom v3.4.x to v4.3.1 and replaces the PostCSS plugin with the dedicated@tailwindcss/viteVite plugin for better DX and faster buildsautoprefixerandpostcssdev-dependencies (v4 handles vendor prefixing automatically)tailwind.config.js) to a CSS-first@theme {}block insidesrc/index.css, preserving the fullbrandcolor palettefrontend/src/tree per the official v4 upgrade guidePlugin approach
@tailwindcss/vite— the Vite-native plugin. This is the recommended approach for Vite projects; it integrates directly into Vite's transform pipeline and requires no PostCSS configuration.Theme approach
CSS-first
@theme {}— the brand color tokens are now declared as CSS custom properties directly insrc/index.css:Utility classes renamed
shadow-smshadow-xsoutline-noneoutline-hiddenflex-shrink-0shrink-0Verification
pnpm build(tsc -b && vite build): passed — 71 KB CSS bundle generatedpnpm lint: passed — 0 errors, 2 pre-existing warnings (unrelated to this PR)pnpm test: passed — 5/5 testsCloses #852
Made with Cursor