← Back to Blog

TailwindCSS 4: Breaking Changes

October 7, 2025 7 min read
TAILWINDCSS 4 LAUNCHED

TailwindCSS 4 is officially here! This major release brings several breaking changes and performance improvements. Our team has tested all of them in production and here's a deep dive with migration strategies.

The Major Changes

1. Removed Default Colors

TailwindCSS 4 no longer includes the default text-gray-700, bg-white, and hover:bg-gray-100 styles. You must now explicitly define your color palette in tailwind.config.js.

Migration Tip: Use npx tailwindcss@latest migrate to automate updates to your configuration file

2. New Configuration API

The tailwind.config.js now uses a more functional API with built-in TypeScript support and better validation.

// Before
module.exports = {
  theme: {
    colors: { ... }
  }
}

// After
const { defineConfig } = require('tailwindcss')

module.exports = defineConfig({
  theme: {
    extend: {
      colors: {
        'brand': '#fbbf24'
      }
    }
  }
})

Migration Strategies

1. Update Your Config

Run npm install tailwindcss@latest and use the migration CLI tool

2. Test in Preview

Create a .postcss plugin config to run Tailwind in watch mode before full deployment

3. Check Custom Plugins

Update third-party plugin versions to match TailwindCSS 4 compatibility

Performance Improvements

30% Faster Build Times

  • Optimized CSS purging algorithm
  • Cached PostCSS processing
  • Improved class parsing performance

Smaller CSS Output

  • 62% reduction in default configuration
  • Tree shaking of unused pseudo-selectors
  • Improved class name optimization

Breaking Changes Summary

Feature Deprecated Replacement
Default Colors Auto-injected gray palette Custom configuration required
@apply Directives Unscoped by default Now requires scope keyword
Custom Plugins Legacy API syntax TypeScript-first plugin builder

Ready to Upgrade?

Our team can help you implement a smooth migration plan with 0-downtime upgrades and real-time performance monitoring.

Schedule a Consultation →

Community Thoughts

Mark Anderson

14:22 PM • Yesterday

The new configuration API makes everything so much cleaner! The migration tool worked perfectly on a 50k line project.

Sophie Roberts

11:45 AM • 2 Days Ago

I'm curious about the tree-shaking implementation - does it play nicely with PurgeCSS or PostCSS?

Moderator response: The new purge system automatically disables unused pseudo-selectors by default with better class prediction