property-allowed-list
Specify a list of allowed properties.
a { color: red; }/** ↑ * This property */Use this rule to enforce a subset of properties as a convention. For example, via overrides, allow only:
/^--/in a tokens file/^(margin|padding|font)/in a reset
This rule ignores preprocessor variables (e.g. $sass, @less).
This rule supports 1 message argument: the disallowed property.
Options
Section titled “Options”Array<string>
Section titled “Array<string>”["array", "of", "properties", "/regex/"]Given:
{ "property-allowed-list": [ "display", "/^(-webkit-)?animation/", "/^background/", "--foo" ]}The following patterns are considered problems:
a { color: red; }a { animation: my-animation 2s; color: red;}a { borkgrund: orange; }a { --bar: red; }The following patterns are not considered problems:
a { display: block; }a { -webkit-animation: my-animation 2s; }a { animation: my-animation 2s; -webkit-animation: my-animation 2s; display: block;}a { background: red; }a { background-color: red; }a { --foo: red; }