1 # declaration-block-no-duplicate-properties
3 Disallow duplicate properties within declaration blocks.
6 a { color: pink; color: orange; }
8 * These duplicated properties */
11 This rule ignores variables (`$sass`, `@less`, `--custom-property`).
17 The following patterns are considered violations:
20 a { color: pink; color: orange; }
24 a { color: pink; background: orange; color: orange }
27 The following patterns are *not* considered violations:
34 a { color: pink; background: orange; }
37 ## Optional secondary options
39 ### `ignore: ["consecutive-duplicates"]`
41 Ignore consecutive duplicated properties.
43 They can prove to be useful fallbacks for older browsers.
45 The following patterns are considered violations:
55 The following patterns are *not* considered violations:
65 ### `ignore: ["consecutive-duplicates-with-different-values"]`
67 Ignore consecutive duplicated properties with different values.
69 Including duplicate properties (fallbacks) is useful to deal with older browsers support for CSS properties. E.g. using 'px' units when 'rem' isn't available.
71 The following patterns are considered violations:
74 /* properties with the same value */
83 /* nonconsecutive duplicates */
91 The following patterns are *not* considered violations:
101 ### `ignoreProperties: ["/regex/", "non-regex"]`
103 Ignore duplicates of specific properties.
108 ["color", "/background\-/"]
111 The following patterns are considered violations:
114 a { color: pink; background: orange; background: white; }
118 a { background: orange; color: pink; background: white; }
121 The following patterns are *not* considered violations:
124 a { color: pink; color: orange; background-color: orange; background-color: white; }
128 a { color: pink; background-color: orange; color: orange; background-color: white; }