1 | # value-list-comma-space-after
|
2 |
|
3 | Require a single space or disallow whitespace after the commas of value lists.
|
4 |
|
5 |
|
6 | ```css
|
7 | a { background-size: 0, 0; }
|
8 | /** ↑
|
9 | * The space after this comma */
|
10 | ```
|
11 |
|
12 | The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix most of the problems reported by this rule.
|
13 |
|
14 | ## Options
|
15 |
|
16 | `string`: `"always"|"never"|"always-single-line"|"never-single-line"`
|
17 |
|
18 | ### `"always"`
|
19 |
|
20 | There _must always_ be a single space after the commas.
|
21 |
|
22 | The following patterns are considered violations:
|
23 |
|
24 |
|
25 | ```css
|
26 | a { background-size: 0,0; }
|
27 | ```
|
28 |
|
29 |
|
30 | ```css
|
31 | a { background-size: 0
|
32 | , 0; }
|
33 | ```
|
34 |
|
35 | The following patterns are _not_ considered violations:
|
36 |
|
37 |
|
38 | ```css
|
39 | a { background-size: 0, 0; }
|
40 | ```
|
41 |
|
42 |
|
43 | ```css
|
44 | a { background-size: 0
|
45 | , 0; }
|
46 | ```
|
47 |
|
48 | ### `"never"`
|
49 |
|
50 | There _must never_ be whitespace after the commas.
|
51 |
|
52 | The following patterns are considered violations:
|
53 |
|
54 |
|
55 | ```css
|
56 | a { background-size: 0, 0; }
|
57 | ```
|
58 |
|
59 |
|
60 | ```css
|
61 | a { background-size: 0 ,
|
62 | 0; }
|
63 | ```
|
64 |
|
65 | The following patterns are _not_ considered violations:
|
66 |
|
67 |
|
68 | ```css
|
69 | a { background-size: 0,0; }
|
70 | ```
|
71 |
|
72 |
|
73 | ```css
|
74 | a { background-size: 0
|
75 | ,0; }
|
76 | ```
|
77 |
|
78 | ### `"always-single-line"`
|
79 |
|
80 | There _must always_ be a single space after the commas in single-line value lists.
|
81 |
|
82 | The following patterns are considered violations:
|
83 |
|
84 |
|
85 | ```css
|
86 | a { background-size: 0,0; }
|
87 | ```
|
88 |
|
89 | The following patterns are _not_ considered violations:
|
90 |
|
91 |
|
92 | ```css
|
93 | a { background-size: 0, 0; }
|
94 | ```
|
95 |
|
96 |
|
97 | ```css
|
98 | a { background-size: 0
|
99 | , 0; }
|
100 | ```
|
101 |
|
102 |
|
103 | ```css
|
104 | a { background-size: 0
|
105 | ,0; }
|
106 | ```
|
107 |
|
108 | ### `"never-single-line"`
|
109 |
|
110 | There _must never_ be whitespace after the commas in single-line value lists.
|
111 |
|
112 | The following patterns are considered violations:
|
113 |
|
114 |
|
115 | ```css
|
116 | a { background-size: 0, 0; }
|
117 | ```
|
118 |
|
119 | The following patterns are _not_ considered violations:
|
120 |
|
121 |
|
122 | ```css
|
123 | a { background-size: 0,0; }
|
124 | ```
|
125 |
|
126 |
|
127 | ```css
|
128 | a { background-size: 0
|
129 | ,0; }
|
130 | ```
|
131 |
|
132 |
|
133 | ```css
|
134 | a { background-size: 0
|
135 | , 0; }
|
136 | ```
|