Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 849 Bytes

value-no-unknown-custom-properties.md

File metadata and controls

59 lines (43 loc) · 849 Bytes

Pattern: Unknown custom property

Issue: -

Description

Disallows usage of unknown custom properties.

Examples

true

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);
}

Further Reading