Tailwind CSS v4 introduces a complete rewrite of the compiler. It replaces PostCSS configurations with a native Rust compiler, reducing build delays to fractions of a millisecond. Here are the core features.
1. Native CSS variables theme config
Instead of structuring configuration settings inside a heavy tailwind.config.js file, v4 maps config tokens directly inside standard CSS stylesheet variables using the @theme directive. This allows tokens to be referenced directly in stylesheet modules.
2. Rust Compiler Speed Upgrades
The PostCSS engine had to parse CSS trees repeatedly during development runs. The new Rust compiler parses source files in parallel, leading to build speeds up to 10x faster than previous compilation engines, guaranteeing instant hot-module replacements (HMR).
Conclusion
Tailwind v4 shifts the utility stylesheet workflow closer to standard CSS variables and features. If compilation speeds or configuration complexity are design bottlenecks, the transition to v4 is a significant upgrade.