Back to Blog
TailwindCSSTooling

Tailwind v4 in production: what changed for us

CSS-first configuration, native cascade layers, and smaller output bundles. Practical notes from migrating client builds to Tailwind v4.

3 min read

Tailwind v4 moved to a CSS-first configuration model, and we have now migrated several live client sites onto it. The short summary: less config boilerplate, faster builds, and smaller shipped stylesheets.

What changed in daily work

Configuration now lives directly in your main CSS file. Instead of maintaining a separate tailwind.config.js, design tokens such as colors, font families, radii, and spacing sit inside a @theme block right next to the CSS that consumes them.

What works better in production

  • Native cascade layers: cleaner base resets and component overrides without specificity hacks
  • Smaller compiled CSS: unused utilities are pruned cleanly at build time
  • Direct Vite integration: using @tailwindcss/vite removes extra PostCSS configuration files from static Astro and React setups

Migration details to watch

If a legacy codebase relies on darkMode: 'class', replace it with a @custom-variant rule in CSS. Custom plugins or non-standard color keys usually take a few one-line adjustments rather than a rewrite.

For a static Astro build, migrating typically takes an afternoon, and the payoff is a simpler build setup with fewer moving parts to maintain over time.

START AN ENGINEERING ENGAGEMENT

Let's build.

Send over your technical brief or project scope. You'll receive an assessment directly from a senior technical lead within 4 business hours.

Fonda Digital

Senior full-stack engineering boutique based in Ljubljana and Izola, Slovenia. Direct access to the engineer writing your code, with zero junior hand-offs.

BASE:Ljubljana / Izola, Slovenia
RESPONSE WINDOW:Within 4 Business Hours (CET)
DIRECT CHANNEL:[email protected]
CURRENT TIME: LJUBLJANA--:--:-- CET
Estimated Budget

Automated spam protection.