This rule reports a Tailwind CSS feature in your stylesheet that Stillwind
ignores, such as @config, @source, or an option on @import. The line has
no effect, because Stillwind reads its settings from stillwind.config.ts and
generates utilities only from style() calls.
Reported
@config "./tailwind.config.js";ignored-tailwind-feature: `@config` has no effect in Stillwind; set the project's `tailwind` field in stillwind.config.ts insteadFixed
import { defineConfig } from "stillwind/config";
import tailwindConfig from "./tailwind.config.js";
export default defineConfig({
projects: [
{
css: "./src/stillwind.css",
files: ["src/**/*.{ts,tsx}"],
tailwind: tailwindConfig,
},
],
});How to fix
- Move the configuration to the
tailwindfield of the project instillwind.config.ts, as in the example, and remove@config. - Move an
importantoption on@importto theimportantfield. - Remove
@source, and move each utility that it listed into astyle()call. - Replace
@referencewith an@importin the stylesheet of the project. - Replace a v3 path in
theme(), such astheme(colors.red.500), with a theme variable:--theme(--color-red-500). Without this change, browsers reject the declaration. - Migrating from Tailwind CSS lists every replacement.
Rule settings
| Preset | Severity |
|---|---|
recommended | warn |
strict | deny |
stylistic | off |
Configure lint to change the severity or options.