You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
5 years ago | |
|---|---|---|
| .. | ||
| README.md | 5 years ago | |
| index.js | 5 years ago | |
README.md
property-whitelist
Specify a whitelist of allowed properties.
a { display: block; }
/** ↑
* 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:
a { color: pink; }
a {
animation: my-animation 2s;
color: pink;
}
a { borkgrund: orange; }
The following patterns are not considered violations:
a { display: block; }
a { -webkit-animation: my-animation 2s; }
a {
animation: my-animation 2s;
-webkit-animation: my-animation 2s;
display: block;
}
a { background: pink; }
a { background-color: pink; }