Skip to content

unknown-variant

Reports a variant that your stylesheet does not define.

This rule reports a variant that your stylesheet does not define, such as a misspelled hovr:. The condition never matches, so the utilities under it never apply.

Reported

style("hovr:p-4");unknown-variant: unknown variant `hovr`; did you mean `hover:p-4`?

Fixed

style("hover:p-4");

How to fix

  • Correct the spelling of the variant.
  • To use a variant of your own, define it with @custom-variant in your stylesheet.

Rule settings

PresetSeverity
recommendeddeny
strictdeny
stylisticoff

Configure lint to change the severity or options.