This rule reports a utility in style.css() that has no element to style.
style.css() returns a stylesheet, not props for an element, so a utility needs
a selector option or a variant that sets its own selector. Otherwise the utility
produces no CSS.
Reported
style.css("p-4");missing-document-target: no variant selects the element to style; start with a variant such as `host:` or `[:root]:`Fixed
style.css("p-4", { selector: ":host" });How to fix
- Add a
selectoroption, such as:hostfor the shadow host. - Or use a variant that sets its own selector, such as
host:p-4.
See style.css().
Rule settings
| Preset | Severity |
|---|---|
recommended | deny |
strict | deny |
stylistic | off |
Configure lint to change the severity or options.