Sha256: 8517b6f01b7027f1aac7b4fb8a4b612ed4aeed6ecf7c8346279e4da4c1d29fbd
Contents?: true
Size: 1.51 KB
Versions: 23
Compression:
Stored size: 1.51 KB
Contents
# declaration-property-unit-whitelist Specify a whitelist of allowed property and unit pairs within declarations. <!-- prettier-ignore --> ```css a { width: 100px; } /** ↑ ↑ * These properties and these units */ ``` ## Options `object`: `{ "unprefixed-property-name": ["array", "of", "units"] }` If a property name is surrounded with `"/"` (e.g. `"/^animation/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^animation/` will match `animation`, `animation-duration`, `animation-timing-function`, etc. Given: ``` { "font-size": ["em", "px"], "/^animation/": ["s"], "line-height": [] } ``` The following patterns are considered violations: <!-- prettier-ignore --> ```css a { font-size: 1.2rem; } ``` <!-- prettier-ignore --> ```css a { animation: animation-name 500ms ease; } ``` <!-- prettier-ignore --> ```css a { -webkit-animation: animation-name 500ms ease; } ``` <!-- prettier-ignore --> ```css a { animation-duration: 500ms; } ``` <!-- prettier-ignore --> ```css a { line-height: 13px; } ``` The following patterns are _not_ considered violations: <!-- prettier-ignore --> ```css a { font-size: 1em; } ``` <!-- prettier-ignore --> ```css a { height: 100px; } ``` <!-- prettier-ignore --> ```css a { animation: animation-name 5s ease; } ``` <!-- prettier-ignore --> ```css a { -webkit-animation: animation-name 5s ease; } ``` <!-- prettier-ignore --> ```css a { animation-duration: 5s; } ``` <!-- prettier-ignore --> ```css a { line-height: 1; } ```
Version data entries
23 entries across 23 versions & 1 rubygems