Skip to content

STYLE001: unknown-style-class

Style class does not exist

Code STYLE001
Name unknown-style-class
Category Styles (STYLE)
Default severity warning
Enabled by default yes
Fix available no
ign-lint equivalent none

Checks every name in a literal classes list (props.style.classes, elementStyle.classes, ... of views, components and session properties) and in the outputs of style-list map transforms. A name resolves when the project (with inheritance) has a style class resource of that path, or when the project stylesheet or a gateway theme in the workspace defines the CSS class Perspective renders for it (psc-<name>, so a stylesheet rule .psc-alarm-blink makes alarm-blink valid).

Perspective silently ignores an unknown class, so the component is not styled the way the author intended. Unknown classes are usually style classes that were renamed, moved or never imported. Class names are case-sensitive: PID/Error does not use the style class pid/Error.

Bound class lists (the literal is only the Designer's cached value) are not checked. When no gateway theme is in the workspace, a name without a style class resource may still be defined by a theme, so it is only reported with strict = true.

{"props": {"style": {"classes": "Brand/Primry"}}}

Use instead:

{"props": {"style": {"classes": "Brand/Primary"}}}

Generated from the rule metadata by iglint generate-docs; iglint rule STYLE001 prints the same page in the terminal. Source: docs/rules/STYLE001.md.