@theme, @utility and @custom-variant — Tailwind-v4-style config written in your stylesheet.
Syntax#
nakshora.config.js
/* app.css — Tailwind-v4-style CSS config */
@theme {
--color-brand-500: #6d28d9;
}
@utility tab-4 {
tab-size: 4;
}
@custom-variant hocus (&:hover, &:focus);Details & defaults#
New in 3.1: write configuration in the stylesheet itself. @theme defines tokens as CSS variables, @utility registers custom utilities, @custom-variant creates new variants. It composes with — never replaces — the JS config.
Worked examples#
- Define
--color-brand-*once in CSS, usebg-brand-500everywhere - Create a
hocusvariant for hover+focus in one declaration
Related options#
See the configuration/index|configuration hub for the full option table, and api/theme-resolution|theme resolution for how options merge.
