Change8

Migrating to Tailwind CSS v4.0.5

Version v4.0.5 introduces 1 breaking change. This guide details how to update your code.

Released: 2/8/2025

1
Breaking Changes
1
Migration Steps
2
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

@theme@tailwindcss/vite

Breaking Changes

Issue #1

Theme variables that are not used in the compiled CSS are now excluded by default to reduce file size.

Migration Steps

  1. 1
    If your project relies on theme variables being present in the CSS for external scripts or runtime manipulation, add the 'static' keyword to your @theme block: @theme static { ... }

Release Summary

This release optimizes CSS output by excluding unused theme variables by default and introduces a 'static' option for the @theme directive to override this behavior.

Need More Details?

View the full release notes and all changes for Tailwind CSS v4.0.5.

View Full Changelog