Sha256: 5816875d9c0bcfe22973fba96d31ada7619314eabcd16a850bc34fe2e7cdbb32
Contents?: true
Size: 1.32 KB
Versions: 23
Compression:
Stored size: 1.32 KB
Contents
# property-whitelist Specify a whitelist of allowed properties. <!-- prettier-ignore --> ```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: ``` ["display", "animation", "/^background/"] ``` The following patterns are considered violations: <!-- prettier-ignore --> ```css a { color: pink; } ``` <!-- prettier-ignore --> ```css a { animation: my-animation 2s; color: pink; } ``` <!-- prettier-ignore --> ```css a { borkgrund: orange; } ``` The following patterns are _not_ considered violations: <!-- prettier-ignore --> ```css a { display: block; } ``` <!-- prettier-ignore --> ```css a { -webkit-animation: my-animation 2s; } ``` <!-- prettier-ignore --> ```css a { animation: my-animation 2s; -webkit-animation: my-animation 2s; display: block; } ``` <!-- prettier-ignore --> ```css a { background: pink; } ``` <!-- prettier-ignore --> ```css a { background-color: pink; } ```
Version data entries
23 entries across 23 versions & 1 rubygems