.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / declaration-block-no-shorthand-property-overrides / README.md
1 # declaration-block-no-shorthand-property-overrides
2
3 Disallow shorthand properties that override related longhand properties.
4
5 ```css
6 a { background-repeat: repeat; background: green; }
7 /**                            ↑
8  * This overrides the longhand property before it */
9 ```
10
11 In almost every case, this is just an authorial oversight. For more about this behavior, see [MDN's documentation of shorthand properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties).
12
13 ## Options
14
15 ### `true`
16
17 The following patterns are considered violations:
18
19 ```css
20 a {
21   padding-left: 10px;
22   padding: 20px;
23 }
24 ```
25
26 ```css
27 a {
28   transition-property: opacity;
29   transition: opacity 1s linear;
30 }
31 ```
32
33 ```css
34 a {
35   -webkit-transition-property: opacity;
36   -webkit-transition: opacity 1s linear;
37 }
38 ```
39
40 ```css
41 a {
42   border-top-width: 1px;
43   top: 0;
44   bottom: 3px;
45   border: 2px solid blue;
46 }
47 ```
48
49 The following patterns are *not* considered violations:
50
51 ```css
52 a { padding: 10px; padding-left: 20px; }
53 ```
54
55 ```css
56 a { transition-property: opacity; } a { transition: opacity 1s linear; }
57 ```
58
59 ```css
60 a { transition-property: opacity; -webkit-transition: opacity 1s linear; }
61 ```