unserved-variant

A bare variant name Tailwind serves no variant for, on a utility it serves.

Message

A name in angle brackets is a value the message fills in.

aria

[csszyx] unserved-variant: `<className>` produces no CSS: Tailwind serves no `<variant>` variant.
  help: write `aria: { <variant>: { … } }` for the ARIA state.
  note: the class is still emitted, and it styles nothing unless the project defines `<variant>` with `@custom-variant`.
  docs: https://csszyx.com/e/unserved-variant

attribute-or-aria

[csszyx] unserved-variant: `<className>` produces no CSS: Tailwind serves no `<variant>` variant.
  help: write `{ '[<variant>]': { … } }` to match the HTML attribute, or `aria: { <variant>: { … } }` for the ARIA state.
  note: the class is still emitted, and it styles nothing unless the project defines `<variant>` with `@custom-variant`.
  docs: https://csszyx.com/e/unserved-variant

unknown

[csszyx] unserved-variant: `<className>` produces no CSS: Tailwind serves no `<variant>` variant.
  help: check the spelling of `<variant>`.
  note: the class is still emitted, and it styles nothing unless the project defines `<variant>` with `@custom-variant`.
  docs: https://csszyx.com/e/unserved-variant

Level

Default: error under recommended, error under atomic. Set it in csszyx.config: rules: { 'unserved-variant': 'warn' }.

The level sets how the build and csszyx check report it. It does not change a console line, and it does not stop a thrown error.

Arguments

The values this diagnostic names.

NameType
form'aria' | 'attribute-or-aria' | 'unknown'
variantstring
classNamestring