.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / shorthand-property-no-redundant-values / README.md
1 # shorthand-property-no-redundant-values
2
3 Disallow redundant values in shorthand properties.
4
5 ```css
6 a { margin: 1px 1px 1px 1px; }
7 /**             ↑   ↑   ↑
8  *           These values */
9 ```
10
11 This rule alerts you when you use redundant values in the following shorthand properties:
12
13 -   `margin`
14 -   `padding`
15 -   `border-color`
16 -   `border-radius`
17 -   `border-style`
18 -   `border-width`
19 -   `grid-gap`
20
21 The `--fix` option on the [command line](../../../docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.
22
23 ## Options
24
25 ### `true`
26
27 The following patterns are considered violations:
28
29 ```css
30 a { margin: 1px 1px; }
31 ```
32
33 ```css
34 a { margin: 1px 1px 1px 1px; }
35 ```
36
37 ```css
38 a { padding: 1px 2px 1px; }
39 ```
40
41 ```css
42 a { border-radius: 1px 2px 1px 2px; }
43 ```
44
45 ```css
46 a { -webkit-border-radius: 1px 1px 1px 1px; }
47 ```
48
49 The following patterns are *not* considered violations:
50
51 ```css
52 a { margin: 1px; }
53 ```
54
55 ```css
56 a { margin: 1px 1px 1px 2px; }
57 ```
58
59 ```css
60 a { padding: 1px 1em 1pt 1pc; }
61 ```
62
63 ```css
64 a { border-radius: 10px / 5px; }
65 ```