Skip to content

invalid-utility

Reports a known utility written in a form that it does not accept.

This rule reports a utility whose name is known but whose form is not valid. For example, flex has no negative form, so -flex is invalid. The utility produces no CSS.

Reported

style("-flex");invalid-utility: `flex` does not accept a negative value

Fixed

style("flex");

How to fix

  • Remove the modifier or value that the utility does not accept.
  • Check the accepted forms in Built-in utilities.

A utility name or theme value that does not exist is reported by unknown-utility instead.

Rule settings

PresetSeverity
recommendeddeny
strictdeny
stylisticoff

Configure lint to change the severity or options.