Skip to content

feat(build): upgrade Tailwind CSS 3 → 4 (CSS-first) - #58

Merged
dotMavriQ merged 1 commit into
mainfrom
chore/tailwind-4-upgrade
Jul 7, 2026
Merged

feat(build): upgrade Tailwind CSS 3 → 4 (CSS-first)#58
dotMavriQ merged 1 commit into
mainfrom
chore/tailwind-4-upgrade

Conversation

@dotMavriQ

Copy link
Copy Markdown
Owner

What

Migrates the frontend to Tailwind CSS 4, CSS-first via @tailwindcss/vite.

  • resources/css/app.css: @tailwind directives → @import 'tailwindcss'; the JS color config (tailwind.config.js) → @theme inline; custom .btn-*/.theme-link classes → @utility; @plugin '@tailwindcss/forms'.
  • Deleted tailwind.config.js and postcss.config.js; removed @tailwindcss/postcss + postcss + autoprefixer deps.
  • vite.config.js: wired @tailwindcss/vite.
  • Dockerfile: dropped the removed config files from the build COPY.
  • Official @tailwindcss/upgrade codemod renamed utility classes across 69 blade templates (pure class renames — verified no content loss).

Two non-mechanical fixes (why this wasn't just the codemod)

  1. @theme inline, not @theme. TEAL's theme-* colors resolve to --color-* CSS vars that swap per [data-theme] at runtime. inline makes utilities reference those vars directly, so theme-switching keeps working.
  2. teal-2026 neubrutalism shadows. v4 renamed the shadow scale (shadow-smshadow-xs, shadowshadow-sm). The hand-written ink-shadow overrides targeted the old names, so post-codemod the ink tiers were scrambled on the prod-default theme. Remapped them to the new names (mechanism — --tw-shadowbox-shadow — still holds in v4) and dropped dead --tw-shadow-colored no-ops.

Verification (local)

  • npm run build ✅ TW4, 55 modules, app.css 70.7 → 81.7 kB (expected: v4 base/preflight)
  • npm run dev ✅ HMR, app.css served 200 via the vite plugin
  • php artisan view:cache ✅ all 69 blades compile
  • Screenshot across all three themes (teal-2026 / normie / gruvbox-dark): colors swap correctly, teal-2026 ink-shadows + breadcrumb pills render, buttons / status badges / inputs / selects / stars all themed. (Verified via a component harness against the compiled CSS, not the full seeded app.)

Before merge

Since my visual check used a component harness rather than the live seeded app, worth a quick eyeball on a running instance — especially the teal-2026 default. Merging auto-deploys to prod.

Resolves #29. Unblocks #33 (@tailwindcss/forms@0.5.11 already TW4-compatible).

🤖 Generated with Claude Code

…ite)

Migrated with the official @tailwindcss/upgrade codemod, then hand-fixed
the theme system and prod build:

- app.css: @tailwind directives → @import 'tailwindcss'; JS color config
  → @theme inline (inline is required — the theme colors reference
  --color-* vars that flip per [data-theme] at runtime); custom .btn-*
  / .theme-link classes → @Utility.
- Fixed the teal-2026 neubrutalism shadow hooks for v4: the shadow scale
  renamed (old shadow-sm→shadow-xs, old shadow→shadow-sm) so the
  hand-written ink-shadow overrides were remapped to keep the same tiers;
  dropped the dead v3 --tw-shadow-colored no-ops.
- Wired @tailwindcss/vite in vite.config.js; removed postcss.config.js,
  tailwind.config.js, and the @tailwindcss/postcss + postcss deps.
- Dockerfile: drop the now-removed config files from the build COPY.
- Codemod renamed utility classes across 69 blade templates.

Verified locally: npm run build (TW4, 55 modules) + npm run dev (HMR,
app.css served 200); all 69 blades compile (view:cache); and a
component harness screenshotted under all three themes (teal-2026 /
normie / gruvbox-dark) — colors swap correctly and the teal-2026
ink-shadows + breadcrumb pills render.

Resolves #29. Unblocks #33 (forms 0.5.11 already TW4-compatible).
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@dotMavriQ, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8b8162b6-f398-421a-8646-1233a858c42e

📥 Commits

Reviewing files that changed from the base of the PR and between 540edc0 and 84a5745.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (75)
  • Dockerfile
  • package.json
  • postcss.config.js
  • resources/css/app.css
  • resources/views/components/danger-button.blade.php
  • resources/views/components/dropdown-link.blade.php
  • resources/views/components/dropdown.blade.php
  • resources/views/components/nav-link.blade.php
  • resources/views/components/primary-button.blade.php
  • resources/views/components/responsive-nav-link.blade.php
  • resources/views/components/secondary-button.blade.php
  • resources/views/components/text-input.blade.php
  • resources/views/layouts/app.blade.php
  • resources/views/livewire/albums/album-discogs-search.blade.php
  • resources/views/livewire/albums/album-form.blade.php
  • resources/views/livewire/albums/album-index.blade.php
  • resources/views/livewire/albums/album-show.blade.php
  • resources/views/livewire/anime/anime-form.blade.php
  • resources/views/livewire/anime/anime-import.blade.php
  • resources/views/livewire/anime/anime-index.blade.php
  • resources/views/livewire/anime/anime-metadata-enrichment.blade.php
  • resources/views/livewire/anime/anime-settings.blade.php
  • resources/views/livewire/anime/anime-show.blade.php
  • resources/views/livewire/board-games/board-game-bgg-search.blade.php
  • resources/views/livewire/board-games/board-game-form.blade.php
  • resources/views/livewire/board-games/board-game-index.blade.php
  • resources/views/livewire/board-games/board-game-show.blade.php
  • resources/views/livewire/books/book-form.blade.php
  • resources/views/livewire/books/book-import.blade.php
  • resources/views/livewire/books/book-index.blade.php
  • resources/views/livewire/books/book-openlibrary-search.blade.php
  • resources/views/livewire/books/book-settings.blade.php
  • resources/views/livewire/books/book-show.blade.php
  • resources/views/livewire/books/json-import.blade.php
  • resources/views/livewire/books/metadata-enrichment.blade.php
  • resources/views/livewire/books/read-queue.blade.php
  • resources/views/livewire/comics/comic-form.blade.php
  • resources/views/livewire/comics/comic-import.blade.php
  • resources/views/livewire/comics/comic-index.blade.php
  • resources/views/livewire/comics/comic-issue-show.blade.php
  • resources/views/livewire/comics/comic-settings.blade.php
  • resources/views/livewire/comics/comic-show.blade.php
  • resources/views/livewire/comics/comic-vine-search.blade.php
  • resources/views/livewire/concerts/concert-form.blade.php
  • resources/views/livewire/concerts/concert-index.blade.php
  • resources/views/livewire/concerts/concert-setlistfm-search.blade.php
  • resources/views/livewire/concerts/concert-show.blade.php
  • resources/views/livewire/custom-pagination.blade.php
  • resources/views/livewire/dashboard.blade.php
  • resources/views/livewire/games/game-form.blade.php
  • resources/views/livewire/games/game-igdb-search.blade.php
  • resources/views/livewire/games/game-index.blade.php
  • resources/views/livewire/games/game-show.blade.php
  • resources/views/livewire/layout/navigation.blade.php
  • resources/views/livewire/listening/listening-index.blade.php
  • resources/views/livewire/movies/movie-form.blade.php
  • resources/views/livewire/movies/movie-import.blade.php
  • resources/views/livewire/movies/movie-index.blade.php
  • resources/views/livewire/movies/movie-metadata-enrichment.blade.php
  • resources/views/livewire/movies/movie-settings.blade.php
  • resources/views/livewire/movies/movie-show.blade.php
  • resources/views/livewire/movies/movie-tmdb-search.blade.php
  • resources/views/livewire/pages/auth/login.blade.php
  • resources/views/livewire/pages/auth/register.blade.php
  • resources/views/livewire/pages/auth/verify-email.blade.php
  • resources/views/livewire/playing/playing-index.blade.php
  • resources/views/livewire/profile/update-profile-information-form.blade.php
  • resources/views/livewire/reading/reading-index.blade.php
  • resources/views/livewire/watching/watching-index.blade.php
  • resources/views/livewire/welcome/navigation.blade.php
  • resources/views/profile.blade.php
  • resources/views/vendor/pagination/simple-tailwind.blade.php
  • resources/views/vendor/pagination/tailwind.blade.php
  • tailwind.config.js
  • vite.config.js

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Too big: expected string to have <=250 characters at "tone_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/tailwind-4-upgrade

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dotMavriQ
dotMavriQ merged commit a6c05be into main Jul 7, 2026
6 checks passed
@dotMavriQ
dotMavriQ deleted the chore/tailwind-4-upgrade branch July 7, 2026 08:30
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.

Upgrade Tailwind CSS 3 → 4

1 participant