Pattern: Unknown custom property
Issue: -
Disallows usage of unknown custom properties.
If the first option is true
, the rule requires all custom properties to be known, and the following patterns are
not considered violations:
:root {
--brand-blue: #33f;
}
.example {
color: var(--brand-blue);
}
.example {
color: var(--brand-blue);
}
.some-other-class {
--brand-blue: #33f;
}
:root {
--brand-blue: #33f;
--brand-color: var(--brand-blue);
}
While the following patterns are considered violations:
.example {
color: var(--brand-blue);
}
:root {
--brand-color: var(--brand-blue);
}