Loading...
Loading...

Tailwind CSS v4 shipped the Oxide engine — a full Rust rewrite of the core. CSS-first config, 100x faster builds, and a completely new mental model. Here's everything you need to know.
Tailwind CSS v4 has been out for a while now, and I'm genuinely shocked how little attention the technical achievement behind it is getting. Everyone's talking about the CSS-first config syntax (which is great), but the real story is the Oxide engine — a ground-up Rust rewrite that makes Tailwind builds 100x faster.
Not 2x. Not 10x. One hundred times faster. 🤯
Let me show you what changed, why it matters, and how to migrate your projects.
Tailwind v3 was built on PostCSS with a JavaScript-based engine. It was fast enough — builds took 300-500ms on a typical project. Nobody was complaining.
But Adam Wathan and the team had a vision: what if CSS processing was so fast it was essentially invisible? What if rebuilds happened in under 5ms?
Enter Oxide — Tailwind's new core written in Rust using the Lightning CSS parser.
| Metric | Tailwind v3 | Tailwind v4 (Oxide) | Improvement |
|---|---|---|---|
| Initial build | 300-500ms | 3-5ms | ~100x |
| Incremental rebuild | 50-100ms | <1ms | ~100x |
| CSS parsing | PostCSS (JS) | Lightning CSS (Rust) | Fundamentally different |
| Config format | tailwind.config.js | CSS @theme directive | Native CSS |
| Content detection | Config content array | Automatic source detection | Zero config |
| Package size | 15MB (node_modules) | 8MB | 47% smaller |
The 100x number isn't marketing — I benchmarked it on my portfolio project. Full build went from 380ms to 3.8ms. Incremental rebuilds are literally sub-millisecond. You save a file and the CSS is already regenerated before your browser can request it. ⚡
This is the change that affects your daily workflow. Tailwind v4 killed tailwind.config.js. Your design system now lives in CSS:
/* globals.css — Tailwind v4 */
@import "tailwindcss";
@theme {
/* Colors */
--color-primary-50: oklch(0.97 0.01 260);
--color-primary-500: oklch(0.55 0.2 260);
--color-primary-900: oklch(0.25 0.1 260);
/* Spacing */
--spacing-18: 4.5rem;
--spacing-128: 32rem;
/* Fonts */
--font-display: "Outfit", sans-serif;
--font-body: "Plus Jakarta Sans", sans-serif;
/* Animations */
--animate-fade-in: fade-in 0.5s ease-out;
/* Breakpoints */
--breakpoint-3xl: 120rem;
}
@keyframes fade-in {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}Everything you used to put in tailwind.config.js now goes in @theme. And because it's CSS, your editor gives you native CSS autocomplete, color previews, and syntax highlighting for free. No more jumping between JS config and your components. 🎨
Gone: content: ['./src/**/*.{ts,tsx}'] in your config.
Tailwind v4 automatically finds your template files. It reads your project structure and detects where classes are used. Zero configuration for most projects.
Tailwind v4 uses @layer properly:
@layer theme, base, components, utilities;This means Tailwind utilities always win over component styles, which always win over base styles — regardless of source order. No more !important hacks. 🙌
Some long-awaited additions:
<!-- Container queries (native) -->
<div class="@container">
<div class="@sm:grid-cols-2 @lg:grid-cols-4">
<!-- Responsive to parent, not viewport -->
</div>
</div>
<!-- Field sizing -->
<textarea class="field-sizing-content"></textarea>
<!-- Anchor positioning -->
<div class="anchor-[--tooltip]">
<div class="top-anchor-bottom left-anchor-center">
Tooltip content
</div>
</div>
<!-- Color mixing -->
<div class="bg-primary-500/50"></div>Tailwind v4 defaults to OKLCH color space. Why? Because OKLCH is perceptually uniform — lightness 50 in blue actually looks the same brightness as lightness 50 in yellow. The default palette was redesigned accordingly.
Here's the practical migration path I followed for three production projects:
npm install tailwindcss@latest @tailwindcss/vite
# Remove old PostCSS plugins
npm uninstall @tailwindcss/postcss autoprefixerFor Next.js projects:
npm install tailwindcss@latest @tailwindcss/postcssThe official codemod handles 90% of cases:
npx @tailwindcss/upgradeThis reads your tailwind.config.js and generates equivalent @theme directives in your CSS file. It also updates class names that changed.
| v3 | v4 | Notes |
|---|---|---|
bg-opacity-50 | bg-primary/50 | Opacity modifier syntax |
ring-offset-2 | ring-offset-2 (unchanged) | Still works |
decoration-clone | box-decoration-clone | Renamed for clarity |
flex-grow | grow | Simplified |
flex-shrink | shrink | Simplified |
blur-sm | blur-sm (unchanged) | Still works |
Most class names are the same. The codemod catches the breaking changes.
/* Before (v3) */
@tailwind base;
@tailwind components;
@tailwind utilities;
/* After (v4) */
@import "tailwindcss";That's it. One import replaces three directives.
tailwind.config.jsAfter the codemod converts everything to @theme, delete the old config file. If you had custom plugins, those still work — import them in CSS:
@import "tailwindcss";
@plugin "@tailwindcss/typography";
@plugin "@tailwindcss/forms";On my portfolio project (Next.js 16 + Tailwind v4):
For large codebases, the dev experience improvement is even more dramatic. Teams with 500+ component files were reporting 5-10 second CSS rebuilds with v3. With v4 Oxide, those same builds take 50-100ms. 🏎️
Tailwind v4 is the biggest quality-of-life upgrade in CSS tooling since... well, since Tailwind v1 shipped. The CSS-first config is elegant, the performance is absurd, and the migration path is smooth.
The Rust rewrite trend in JS tooling (Turbopack, SWC, Biome, Oxide) is delivering real results. Not theoretical benchmarks — real "I can feel the difference" improvements.
If you're still on Tailwind v3, the upgrade is worth a Friday afternoon. The codemod handles most of it. Your dev server will feel like it got a turbo button. 🚀
Already on v4? What's your favorite new feature? For me, it's container queries as first-class utilities. Game changer for component libraries.
How I built a dark-theme glassmorphism developer portfolio with 3D liquid metal visuals, canvas particle effects, and smooth scroll animations — all with Next.js 16, React 19, and zero compromises on performance.
The dominant stack costs $0/month to host. Realistic timelines are 2-6 months to first revenue. Here's the complete, no-fluff playbook for going from zero to $10K MRR as a solo developer.
Build and monetize a full-stack SaaS for $0/month using Next.js on Vercel, Supabase for auth + database, and Stripe for payments. Complete guide with free tier limits and real setup steps.