This rule reports a @utility or @custom-variant definition that replaces an
earlier definition with the same name. The definitions do not combine, so the
earlier one is lost. In the example, hocus matches focus only, not hover.
Reported
@custom-variant hocus (&:hover);duplicate-definition: `@custom-variant hocus` is never used because a later definition with the same name replaces it
@custom-variant hocus (&:focus);Fixed
@custom-variant hocus (&:hover, &:focus);How to fix
- To combine the definitions, write them as one definition, as in the example.
- If one of the definitions is left over, remove it.
Rule settings
| Preset | Severity |
|---|---|
recommended | warn |
strict | deny |
stylistic | off |
Configure lint to change the severity or options.