tailwind.config.js
The JavaScript configuration file older Tailwind versions used to define theme values, replaced in version 4 by @theme in CSS.
In more detail
In version 3 tokens were defined in JavaScript and copied into generated CSS, so they lived in two places. Version 4 can still load such a file, but the recommended approach is to keep tokens in the stylesheet.
Related terms
- @theme — The Tailwind CSS version 4 directive where you declare design tokens in CSS, which become both CSS variables and utility classes.
- Tailwind CSS — A CSS framework made of small single-purpose utility classes, such as bg-blue-600 or px-4, that you combine in markup.
Taught in
- Tailwind CSS v4 Engine: CSS Variables & Theme Extensions — Design Systems & Component Engineering