UNPKG

1.31 kBMarkdownView Raw
1# selector-pseudo-class-parentheses-space-inside
2
3Require a single space or disallow whitespace on the inside of the parentheses within pseudo-class selectors.
4
5<!-- prettier-ignore -->
6```css
7input:not( [type="submit"] ) {}
8/** ↑ ↑
9 * The space inside these two parentheses */
10```
11
12The [`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
20There _must always_ be a single space inside the parentheses.
21
22The following patterns are considered violations:
23
24<!-- prettier-ignore -->
25```css
26input:not([type="submit"]) {}
27```
28
29<!-- prettier-ignore -->
30```css
31input:not([type="submit"] ) {}
32```
33
34The following patterns are _not_ considered violations:
35
36<!-- prettier-ignore -->
37```css
38input:not( [type="submit"] ) {}
39```
40
41### `"never"`
42
43There _must never_ be whitespace on the inside the parentheses.
44
45The following patterns are considered violations:
46
47<!-- prettier-ignore -->
48```css
49input:not( [type="submit"] ) {}
50```
51
52<!-- prettier-ignore -->
53```css
54input:not( [type="submit"]) {}
55```
56
57The following patterns are _not_ considered violations:
58
59<!-- prettier-ignore -->
60```css
61input:not([type="submit"]) {}
62```