Skip to content

ignored-tailwind-feature

Reports Tailwind CSS features that Stillwind ignores in the stylesheet, such as @config and @source.

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 instead

Fixed

stillwind.config.tsts
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 tailwind field of the project in stillwind.config.ts, as in the example, and remove @config.
  • Move an important option on @import to the important field.
  • Remove @source, and move each utility that it listed into a style() call.
  • Replace @reference with an @import in the stylesheet of the project.
  • Replace a v3 path in theme(), such as theme(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

PresetSeverity
recommendedwarn
strictdeny
stylisticoff

Configure lint to change the severity or options.