Discovering Tailwind CSS v4

Tailwind CSS v4 brings a revolution in how we style our web applications.

ST

ShipSaaS Team

January 10, 20251 min

Tailwind CSS v4 brings a revolution in how we style our web applications.

Major Changes

New CSS Engine

css
/* v4 Configuration */
@import 'tailwindcss/theme' layer(theme);
@import 'tailwindcss/base' layer(base);
@import 'tailwindcss/components' layer(components);
@import 'tailwindcss/utilities' layer(utilities);

Simplified Configuration

javascript
// tailwind.config.js v4
export default {
  content: ['./src/**/*.{html,js,ts,jsx,tsx}'],
  theme: {
    extend: {
      colors: {
        primary: 'oklch(0.7 0.15 200)',
      },
    },
  },
}

Performance

Metricv3v4
Build time2.5s0.8s
CSS size3.8MB1.2MB
Tree shakingYesImproved

New Utilities

Container Queries

html
<div class="@container">
  <div class="@sm:text-lg @md:text-xl">Container-based responsive!</div>
</div>

Modern Colors

html
<div class="bg-red-500/20 text-blue-600/80">Native opacity support</div>
#tailwindcss#css#frontend#design

Talk with us

Ready to connect your offer?

Tell us how your program operates and where execution loses context.

Contact the team

A focused conversation about your operating context

Newsletter

Stay updated with our latest articles and web development news.

No spam, unsubscribe anytime