What Changed in Tailwind CSS v4
Tailwind v4 is a ground-up rewrite. The biggest breaking change: no more `tailwind.config.js`.
Instead, all theme customization happens in your CSS file using CSS custom properties and @theme:
@import "tailwindcss";
@theme {
--color-primary-500: oklch(65% 0.18 175);
--font-heading: "Space Grotesk", sans-serif;
--radius-lg: 0.75rem;
}This means your design tokens are now actual CSS variables — accessible from any CSS property, JavaScript, and browser DevTools without any config.
Why We Migrated
- 1.Zero runtime overhead — v4 generates purely static CSS with no JS runtime
- 2.CSS variables everywhere —
var(--color-primary-500)works in inline styles, keyframes, and custom CSS - 3.Oxide engine — the new Rust-based engine is 5x faster than Lightning CSS
- 4.Better IntelliSense — IDE autocomplete now reads from CSS, not a JS config object
Our Migration Process
For each project, we:
- 1.Replaced
tailwind.config.jswith@themeblocks inglobals.css - 2.Updated all
theme()" function calls tovar()` references - 3.Removed the
@tailwindcss/typographyplugin (now built-in withprose) - 4.Updated
contentarray to the new@sourcedirective
The migration took ~2 hours per project. The result: smaller CSS bundles and faster dev server startup.