What Changed in Tailwind CSS v4

Tailwind v4 dropped the config file. Here is what that means for your workflow.

Published June 19, 2026
Tailwind CSS v4 changes

Tailwind v4 is a significant rewrite. The biggest change: no more tailwind.config.js.

CSS-first configuration

Everything that used to live in tailwind.config.js now lives in your CSS file:

@import "tailwindcss";

@theme {
  --color-primary: #4f46e5;
  --font-sans: system-ui, sans-serif;
}
\```

Cleaner. One less file to maintain.

## The dark mode change

In v3, you'd add `darkMode: 'class'` to the config. In v4, you declare it in CSS:

```css
@variant dark (&:where(.dark, .dark *));
\```

Same result, different location. This tripped me up when first migrating — the dark: classes compiled fine but never activated until I found this line.

## Performance

Build times are significantly faster in v4. The new Oxide engine rewrites the CSS scanning in Rust. On this project, builds went from ~2s to ~700ms.

---
Steven Doan

Written by

Steven Doan

Freelance web developer. 10+ years building WordPress sites. Now learning Astro in public.

Follow me:

Stay in the loop

New articles on Astro, WordPress, and the modern stack. No spam. Unsubscribe anytime.

UI only — backend coming in a later article.

Related Posts

📦 This is a live demo project

Built step by step in the series Learn Astro from Scratch — read the full guide on doancongtuan.com.