Skip to main content
Tailwind CSS 4: What Changed for Us

Tailwind CSS 4: What Changed for Us

Andrius LukminasAndrius LukminasDecember 22, 20254 min read428 views

Tailwind 4 Highlights

Tailwind CSS 4 brought significant changes to configuration and performance. Here's what mattered for us.

New Configuration Format

The tailwind.config.js file is now optional—CSS-based configuration is preferred:

/* globals.css */
@import "tailwindcss";

@theme {
  --color-primary: #d2f800;
  --color-surface: #080c14;
  --font-sans: "Geist Sans", system-ui, sans-serif;
}

Performance Improvements

Build times improved significantly. The new engine is more efficient at generating only the classes you use.

Migration Steps

  1. Update dependencies to v4
  2. Run the automatic migration tool
  3. Review and adjust custom configurations
  4. Test all components for styling issues

Breaking Changes We Hit

  • Some color utilities changed syntax
  • Plugin API updates required adjustments
  • PostCSS configuration needed updates

Results

After migration, our CSS bundle is smaller and builds are faster. The CSS-based configuration is also easier to maintain.

Related Articles

Comments

0/5000 characters

Comments from guests require moderation.