diff options
Diffstat (limited to 'assets/node_modules/stylelint/lib/rules/property-whitelist/README.md')
-rw-r--r-- | assets/node_modules/stylelint/lib/rules/property-whitelist/README.md | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/assets/node_modules/stylelint/lib/rules/property-whitelist/README.md b/assets/node_modules/stylelint/lib/rules/property-whitelist/README.md new file mode 100644 index 0000000..8847a90 --- /dev/null +++ b/assets/node_modules/stylelint/lib/rules/property-whitelist/README.md @@ -0,0 +1,66 @@ +# property-whitelist + +Specify a whitelist of allowed properties. + +```css +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: + +```js +["display", "animation", "/^background/"] +``` + +The following patterns are considered violations: + +```css +a { color: pink; } +``` + +```css +a { + animation: my-animation 2s; + color: pink; +} +``` + +```css +a { borkgrund: orange; } +``` + +The following patterns are *not* considered violations: + +```css +a { display: block; } +``` + +```css +a { -webkit-animation: my-animation 2s; } +``` + +```css +a { + animation: my-animation 2s; + -webkit-animation: my-animation 2s; + display: block; +} +``` + +```css +a { background: pink; } +``` + +```css +a { background-color: pink; } +``` |