Skip to content

chore(web): Tailwind CSS 4 with the Vite plugin, tw-animate-css, tailwind-merge 3 - #39

Merged
Strandgaard96 merged 2 commits into
mainfrom
chore/web-majors
Sep 9, 2026
Merged

chore(web): Tailwind CSS 4 with the Vite plugin, tw-animate-css, tailwind-merge 3#39
Strandgaard96 merged 2 commits into
mainfrom
chore/web-majors

Conversation

@Strandgaard96

Copy link
Copy Markdown
Owner

Type

  • Bug fix
  • Feature
  • Docs
  • Chore

Summary

Re-lands #38. That PR was merged into the chore/web-majors branch after #36 had already merged that branch into main, so main still has Tailwind 3 (web/tailwind.config.js present, "tailwindcss": "^3"). This PR's only diff against main is the single Tailwind commit from #38; see that PR for the full description.

Short version: official @tailwindcss/upgrade codemod (20 files of utility renames, config → @theme in globals.css), then by hand: @tailwindcss/vite instead of PostCSS, tailwindcss-animatetw-animate-css, tailwind-merge 3, and two codemod mistakes reverted ("outline" variant name, redundant border compat layer).

Test plan

  • Tests pass (cd api && uv run pytest tests/ -v) — no API changes; skipped by path filter
  • Tested locally — tsc, vite build, vitest (67), oxlint, oxfmt, npm audit 0
  • Visual pass on home, catalog, Add Game dialog, leaderboard vs pre-upgrade screenshots — identical, no console output
  • CI on this PR (the stacked chore(web): Tailwind CSS 4 with the Vite plugin, tw-animate-css, tailwind-merge 3 #38 never got CI because ci.yml only runs for PRs into main)

Breaking change?

  • Yes — describe migration path below
  • No

🤖 Generated with Claude Code

Strandgaard96 and others added 2 commits September 9, 2026 09:20
…wind-merge 3

Ran `npx @tailwindcss/upgrade`: tailwind.config.js became an @theme block
in globals.css (same hsl(var(--token)) colours and display font), and
20 files got the v4 utility renames (shadow-sm→shadow-xs, rounded→
rounded-sm, backdrop-blur-sm→-xs, bg-gradient-to-*→bg-linear-to-*,
outline-none→outline-hidden, aspect-[3/4]→aspect-3/4).

Hand edits on top of the codemod:
- Use @tailwindcss/vite instead of the PostCSS route; postcss.config.js,
  postcss and autoprefixer are gone (v4 handles prefixing itself).
- tailwindcss-animate → tw-animate-css (CSS-only successor; same
  animate-in/fade-in/zoom-in-95/slide-in-from-* class names).
- tailwind-merge 2 → 3 (the v4-aware release).
- Revert the codemod's false positive that renamed the Button/Badge
  `"outline"` variant name to `"outline-solid"`.
- Drop the generated border-color compat layer: the base layer already
  applies border-border to *, so it was redundant.

Verified: tsc, vite build (CSS 88 kB), vitest, oxlint/oxfmt, and a
visual pass on home, catalog, Add Game dialog and leaderboard against
the SQLite backend — no differences, no console output.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
chore(web): Tailwind CSS 4 with the Vite plugin, tw-animate-css, tailwind-merge 3
@Strandgaard96
Strandgaard96 merged commit 26a84a8 into main Sep 9, 2026
11 checks passed
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