Skip to content

unknown-utility

Reports a utility or theme value that your stylesheet does not define.

This rule reports a utility that your stylesheet does not define. It also reports a known utility with a theme value that does not exist, such as bg-red-999. The utility produces no CSS.

Reported

style("bg-red-95O");unknown-utility: `bg` has no value `red-95O`; did you mean `bg-red-950`?

Fixed

style("bg-red-950");

How to fix

  • Check the spelling against the theme. In the example, the last character is the letter O instead of zero. The intended token is --color-red-950.
  • To use a value that the theme does not have, add a token to your stylesheet, such as --color-red-999 in @theme, or define the utility with @utility.
  • For a class that another stylesheet defines, pass it in a class field, such as style({ class: "external-card" }).

Built-in utilities looks up the utilities of the default theme.

Rule settings

PresetSeverity
recommendeddeny
strictdeny
stylisticoff

Configure lint to change the severity or options.