1 | # selector-pseudo-class-parentheses-space-inside
|
2 |
|
3 | Require a single space or disallow whitespace on the inside of the parentheses within pseudo-class selectors.
|
4 |
|
5 |
|
6 | ```css
|
7 | input:not( [type="submit"] ) {}
|
8 | /** ↑ ↑
|
9 | * The space inside these two parentheses */
|
10 | ```
|
11 |
|
12 | The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix most of the problems reported by this rule. It won't fix pseudo elements containing comments.
|
13 |
|
14 | ## Options
|
15 |
|
16 | `string`: `"always"|"never"`
|
17 |
|
18 | ### `"always"`
|
19 |
|
20 | There _must always_ be a single space inside the parentheses.
|
21 |
|
22 | The following patterns are considered violations:
|
23 |
|
24 |
|
25 | ```css
|
26 | input:not([type="submit"]) {}
|
27 | ```
|
28 |
|
29 |
|
30 | ```css
|
31 | input:not([type="submit"] ) {}
|
32 | ```
|
33 |
|
34 | The following patterns are _not_ considered violations:
|
35 |
|
36 |
|
37 | ```css
|
38 | input:not( [type="submit"] ) {}
|
39 | ```
|
40 |
|
41 | ### `"never"`
|
42 |
|
43 | There _must never_ be whitespace on the inside the parentheses.
|
44 |
|
45 | The following patterns are considered violations:
|
46 |
|
47 |
|
48 | ```css
|
49 | input:not( [type="submit"] ) {}
|
50 | ```
|
51 |
|
52 |
|
53 | ```css
|
54 | input:not( [type="submit"]) {}
|
55 | ```
|
56 |
|
57 | The following patterns are _not_ considered violations:
|
58 |
|
59 |
|
60 | ```css
|
61 | input:not([type="submit"]) {}
|
62 | ```
|