Plate 45
Tailwind CSS v4 Migration Checklist (2026)
Practical Tailwind CSS v4 migration checklist for Next.js/React teams: @theme tokens, upgrade CLI pitfalls, and what to verify before production.
Aditya Challa5 min read
On this page
- 1. Pre-flight before you touch CSS
- 2. Run the upgrade CLI (then read the diff)
- 3. Move tokens into `@theme` (keep a JS config only if you must)
- 4. Breaking changes that bite UI QA
- 5. Production verification (do not skip)
- Optional tool for indie founders (not a CSS dependency)
- Printable Tailwind v4 checklist
Tailwind CSS v4 Migration Checklist (2026)
Frontend teams on Next.js/React often still carry Tailwind v3 debt: tailwind.config.js, @tailwind directives, and PostCSS plugins that no longer match v4. This is a practical production migration checklist. Primary reference: the official Tailwind CSS upgrade guide.
Related posts on ShopperCove:
- Next.js 16 App Router Production Checklist (2026)
- Build an AI Chat UI with Next.js & shadcn (2026)
- Next.js 16.3 for AI Coding Agents (2026)
- TanStack Start XSS: Patch CVE-2026-102989 Now
- AI SEO for Answer Engines: ChatGPT, Perplexity & Google AI (2026)
- Grow Site Traffic in the AI Search Era (2026)
- Lily in CI: Fuzz-Based Backdoor Detection
- Clozure AI Business OS Review
Affiliate disclosure. This post includes one optional ClickBank affiliate link for Clozure (seller nickname CLOZURE). If you buy through that link, ShopperCove may earn a commission at no extra cost to you. Clozure is not a CSS framework, Tailwind plugin, or Next.js dependency—only an optional AI business OS (email/calendar/CRM) some indie founders use. ShopperCove has not trialed Clozure for this migration guide. ClickBank is the retailer of products on this site. CLICKBANK® is a registered trademark of Click Sales, Inc., a Delaware corporation located at 1444 S. Entertainment Ave., Suite 410, Boise, ID 83709, USA, and used by permission. ClickBank’s role as retailer does not constitute an endorsement, approval, or review of these products or any claim, statement, or opinion used in promotion of these products.
1. Pre-flight before you touch CSS
- Browser support gate — Tailwind v4 targets Safari 16.4+, Chrome 111+, and Firefox 128+. If you still must support older browsers, stay on v3.4 until that requirement changes.
- Node.js 20+ — the official upgrade tool requires Node 20 or higher.
- Clean git branch — commit or stash first. Run
npx @tailwindcss/upgradeon a dedicated branch so you can review the full diff. - Inventory plugins — third-party plugins, old
corePluginstoggles, Sass/Less, and CSS modules / SFC<style>blocks that@applytokens (usual hand-fix zones).
2. Run the upgrade CLI (then read the diff)
For most apps, start here:
Expect it to update dependencies, rewrite CSS directives, convert much of tailwind.config.js into @theme, and rename utilities. Common pitfalls: dirty git tree; still using the old tailwindcss PostCSS plugin instead of @tailwindcss/postcss; scripts calling npx tailwindcss instead of @tailwindcss/cli; skipping visual QA because the build passed.
Vite users: prefer @tailwindcss/vite. Next.js/React on PostCSS: switch the plugin package and drop postcss-import / autoprefixer when v4 already handles imports and prefixes.
3. Move tokens into @theme (keep a JS config only if you must)
v4’s big mental shift: theme lives in CSS.
Map habitually: colors → --color-*, screens → --breakpoint-*, spacing → --spacing-*. Prefer var(--color-…) over theme(colors.…). JS configs need an explicit @config—v4 no longer auto-detects them. v3 corePlugins / safelist / separator options do not carry over the same way; safelist with @source inline() when needed. Custom utilities use @utility; variants use @custom-variant. Add @source only for non-standard content paths.
4. Breaking changes that bite UI QA
Watch these in staging (full list lives in the upgrade guide):
- Renames — e.g.
shadow→shadow-sm,shadow-sm→shadow-xs; same pattern for blur/rounded;outline-none→outline-hiddenwhen you meant the old invisible outline; barering→ring-3if you depended on 3px rings. - Defaults —
border-*/divide-*default tocurrentColor(not gray-200); ring default color likewise. Explicit colors prevent “invisible borders” surprises. - Selectors —
space-*/divide-*selector changes can shift spacing; prefer flex/grid +gapwhen layouts look wrong. - Prefixes & important — prefixes look like variants (
tw:flex);!goes at the end of the class (bg-red-500!). - CSS variables in arbitrary values —
bg-(--brand)notbg-[--brand]. - No Sass/Less/Stylus as a companion preprocessor for Tailwind v4 stylesheets—treat Tailwind as the preprocessor.
- CSS modules / SFC
@apply— use@referenceto pull theme from the main CSS file, or use CSS variables directly.
shadcn/ui stacks usually migrate cleanly once tokens and borders are explicit—see our Next.js + shadcn AI chat UI notes if you share those primitives.
5. Production verification (do not skip)
- Cold production build (not only
dev). - Visual pass: dark mode, focus rings, forms, dialogs, cards with borders.
- Responsive breakpoints you customized (including any
@theme--breakpoint-*). - Storybook / Chromatic / Percy if you have them—utility renames are screenshot gold.
- Confirm lockfile resolves
tailwindcssv4 and the right@tailwindcss/*packages. - Redeploy—local
node_modulesalone does not fix CDN or CI images.
After CSS is green, keep App Router hygiene (Next.js 16 checklist) and treat dependency bumps seriously (TanStack Start CVE checklist).
Optional tool for indie founders (not a CSS dependency)
Migrating Tailwind does not require a new SaaS. Solo founders who also want email/calendar/CRM sometimes evaluate an AI business OS separately from CSS.
One disclosed option (vendor claims only; ShopperCove has not hands-on tested it for this guide):
Clozure AI Business OS via ClickBank hop
Skip it if you already have ops tooling or only came for the @theme / upgrade CLI checklist. Verify export, cancel, and access controls before putting customer data in any SaaS.
Printable Tailwind v4 checklist
- Confirm modern browser targets + Node 20+
- Branch + clean tree →
npx @tailwindcss/upgrade - Switch PostCSS/Vite/CLI packages; drop obsolete PostCSS helpers
- Land tokens in
@theme;@configonly if JS config must remain - Fix renames: shadows, rings, outline-hidden, borders with explicit colors
- Fix
@utility/@custom-variant/@referencefor custom & SFC CSS - Visual + production build QA; redeploy
- Ops tools last — Clozure-style OS only if founder ops need it
Ship the CSS upgrade first. Everything else is optional.
Lab evidence
What I found running this
Trend + ethical affiliate package (frontend high-intent). No eng micro-benchmarks. No invented lab numbers. Drafted 1 Oct 2026 IST. Affiliates: 1 Clozure hop only.
Related links
Plate 53
Next.js 16.3 for AI Coding Agents (2026)
Practical Next.js 16.3 guide for AI coding agents: AGENTS.md, first-party Skills, agent-browser, Instant Insights, DevTools MCP.
1 Oct 2026
Plate 63
TanStack Start XSS: Patch CVE-2026-102989 Now
TanStack Start CVE-2026-102989: patched versions, lockfile checks, and redeploy steps from the official advisory.
1 Oct 2026
Plate 59
Build an AI Chat UI with Next.js & shadcn (2026)
Build an AI Chat UI with Next.js & shadcn (2026)
1 Oct 2026