Skip to content

Tailwind CSS v4: where did tailwind.config.js go?

JavaScript & frontend 0 replies 0 views Started 2 weeks ago

ProticLink

Team

2 weeks ago #1
Tailwind v4 is configured in CSS. Instead of tailwind.config.js, add your theme to your main CSS file:
@import "tailwindcss";

@theme {
  --color-brand-500: #2563eb;
  --font-sans: 'Inter', sans-serif;
}
Classes like bg-brand-500 then work straight away. Run npm run build after changes so production gets the new CSS.

Join the discussion — it's free.

Sign in to reply

Are you sure?

Install ProticLink

Open the store from your home screen like an app — faster, full screen, one tap to your library and license keys.

Choose which optional cookies we may use. You can change this at any time from the footer.

Strictly necessarySign-in, security, your cart and checkout. These cannot be switched off. Always on