---
title: "Tailwind CSS 4.0 vs 3.x: What Changed and How We Implemented It"
type: post
url: https://www.incentius.com/blog-posts/tailwind-css-40-vs-3x-what-changed-and-how-we-implemented-it/
markdown_url: https://www.incentius.com/blog-posts/tailwind-css-40-vs-3x-what-changed-and-how-we-implemented-it.md
publisher: "Incentius"
author: "Abhishek Sutar"
published: 2025-09-16T09:46:53.277910Z
tags: ["['Tailwind CSS'", "'CSS']"]
language: en
cite_as: "Abhishek Sutar, \"Tailwind CSS 4.0 vs 3.x: What Changed and How We Implemented It\", Incentius, 2025-09-16, https://www.incentius.com/blog-posts/tailwind-css-40-vs-3x-what-changed-and-how-we-implemented-it/"
---

# Tailwind CSS 4.0 vs 3.x: What Changed and How We Implemented It

Tailwind CSS has always been a developer favourite for building fast, responsive UIs. With **Tailwind 4.0**, the framework takes a significant leap forward, leaving behind some of the bottlenecks of version 3.x and fully embracing modern CSS. Let’s break down the **biggest changes** and how we used them in our project.

## Major Changes from Tailwind 3.x to 4.0

### 1\. Performance with Oxide Engine

-   **Before (3.x):** Builds could get slow in larger projects with many custom configs.
-   **Now (4.0):** Rust-powered Oxide engine makes builds up to **8× faster**.

### 2\. Simplified Setup

-   **Before:** Required tailwind.config.js, PostCSS plugins, and extra setup.
-   **Now:** Just @import "tailwindcss"; in your CSS—zero-config startup.

### 3\. Customisation via CSS

-   **Before:** Theme values had to live in tailwind.config.js.
-   **Now:** Use @theme directly in CSS with design tokens like --color-brand: #0f172a;.

### 4\. Modern CSS Features

-   Container queries, cascade layers, color-mix(), and wide-gamut P3 colours are built in.
-   No need for polyfills or external hacks.

### 5\. Smarter Utilities

-   Dynamic classes like w-\[17rem\], grid-cols-15, or even bg-\[color-mix(in srgb, red 50%, blue)\].

## How We Implemented Tailwind 4.0 in Our Project

When upgrading from Tailwind 3.x, we followed a structured approach:

1.  **Upgrade Process**
    -   Removed our old tailwind.config.js since most tokens are now handled via @theme.
    -   Updated our CSS entry file to:

```

@import "tailwindcss";
@theme {
  --color-brand: #2563eb;
  --radius-md: 0.5rem;
}
```

1.  **Refactoring Components**
    -   Migrated utilities that relied on older config-based customisation into CSS theme variables.
    -   Used the new container and @layer utilities for more granular control.

1.  **Performance Gains**
    -   Build times dropped significantly during development.
    -   Hot reload feedback loop is almost instant now.

1.  **UI Enhancements**
    -   Adopted **P3 colours** for vivid visuals.
    -   Used **container queries** to make responsive layouts smarter without writing tons of media queries.

## Results

-   **Simpler setup** → Faster onboarding for new developers.
-   **Faster builds** → Productivity boost with almost no lag.
-   **Cleaner design tokens** → Easier to maintain and scale.
-   **Better UX** → More responsive, modern-feeling UI.

## Conclusion

The jump from **Tailwind 3.x to 4.0** is not just incremental—it’s transformative. With a faster engine, CSS-first customisation, and native support for modern CSS, it makes building scalable design systems smoother than ever.

For our project, the upgrade has been a **game-changer**: faster development cycles, cleaner theming, and a future-ready UI stack.
