property-allowed-list
Specify a list of allowed properties.
display: block; }
a { /** ↑
* This property */
This rule ignores variables ($sass
, @less
,
--custom-property
).
Options
array|string
:
["array", "of", "unprefixed", /properties/ or "regex"]|"property"|"/regex/"
|/regex/
If a string is surrounded with "/"
(e.g. "/^background/"
), it is interpreted as a regular
expression. This allows, for example, easy targeting of shorthands:
/^background/
will match background
,
background-size
, background-color
, etc.
Given:
["display", "animation", "/^background/"]
The following patterns are considered violations:
color: pink; } a {
a {animation: my-animation 2s;
color: pink;
}
: orange; } a { borkgrund
The following patterns are not considered violations:
display: block; } a {
-webkit-animation: my-animation 2s; } a {
a {animation: my-animation 2s;
-webkit-animation: my-animation 2s;
display: block;
}
background: pink; } a {
background-color: pink; } a {