Tailwind v4: The Migration Notes I Wish I'd Had
The config file is gone, a few class names quietly changed meaning, and one theme setting will confuse you. Here's the short list.
Tailwind v4 came out on January 22. The headline is speed: a new engine, full builds several times faster, and incremental rebuilds that are close to instant. That's real, but it's not what you'll spend upgrade day on.
What you'll spend it on is a handful of changes that don't throw errors. Your build passes, and some borders look different.
The config moved into CSS
There's no tailwind.config.js by default anymore. Setup is one import, and your design tokens live in CSS:
@import "tailwindcss";
@theme {
--color-brand: #c8f560;
--font-display: "Space Grotesk", sans-serif;
}That gives you bg-brand and font-display, and every token is also a real CSS variable you can use anywhere with var(--color-brand). Content detection is automatic too, so the content: [...] array is gone.
If you're not ready to move everything, @config "./tailwind.config.js"; still loads the old file.
Run the upgrade tool first
npx @tailwindcss/upgradeIt rewrites your CSS entry, moves the theme over, and renames classes in your templates. It does most of the work. Then read the diff, because the next section is what it can't judge for you.
Changes that pass the build and still change the UI
These are the ones that caught me:
| v3 | v4 | Why it bites |
|---|---|---|
shadow-sm | shadow-xs | The whole scale shifted down one step |
rounded-sm | rounded-xs | Same shift for radius |
outline-none | outline-hidden | outline-none now really removes it |
ring (3px) | ring-3 | Plain ring is now 1px |
border (gray-200) | border border-gray-200 | Default border color is currentColor |
bg-opacity-50 | bg-black/50 | Opacity utilities are gone |
!font-bold | font-bold! | The important modifier moved to the end |
The border one is the sneakiest. Every bare border in your app turns from light gray to the text color. On a dark theme with white text, that's a lot of bright lines.
The one setting that will confuse you: @theme inline
When a token points at another variable, like a font loaded by next/font, you'll see @theme inline in examples:
@theme inline {
--font-sans: var(--font-geist);
}inline makes the utility use the value directly instead of going through a --font-sans variable. That's fine for utilities. But if plain CSS somewhere else reads var(--font-sans), that variable now holds Tailwind's default, not yours. I lost an hour to code blocks rendering in the wrong font for exactly this reason.
Rule of thumb: use @theme inline for tokens only utilities read. Use plain @theme for anything your own CSS also reads.
Things that got better
- Container queries are built in.
@containeron the parent,@sm:and@lg:on the children. No plugin. not-*variants.not-hover:opacity-70reads better than the workarounds it replaces.- Real cascade layers. Your own component CSS in
@layer componentsloses to utilities, as it should, without!important.
Check your browsers before you start
v4 depends on modern CSS: cascade layers, @property, and color-mix(). It targets Safari 16.4+, Chrome 111+, and Firefox 128+. If you still support older browsers, stay on v3.4 for now. That's a product decision, not a technical one, so ask before you upgrade.
Keep reading
All posts2026
7 min
Code Is Cheap Now. Guardrails Are the Bare Minimum
An agent writes a feature in minutes. Whether it still works next week depends on what checks it the moment it changes. What I treat as non-negotiable now, on the backend, on the web, and on mobile.
testingaiworkflow5 min
Why T3 Code Replaced the Terminal as My Daily Agent Setup
Same agents, same subscriptions, one interface. Threads with their own worktrees, review before commit, approvals from my phone, and a second model one click away. What changed in my day, and what it still doesn't solve.
aiworkflowtooling