.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / selector-combinator-space-after / README.md
1 # selector-combinator-space-after
2
3 Require a single space or disallow whitespace after the combinators of selectors.
4
5 ```css
6   a > b + c ~ d e >>> f { color: pink; }
7 /** ↑   ↑   ↑  ↑  ↑
8  * These are combinators */
9 ```
10
11 Combinators are used to combine several different selectors into new and more specific ones. There are several types of combinators, including: child (`>`), adjacent sibling (`+`), general sibling (`~`), and descendant (which is represented by a blank space between two selectors).
12
13 The descendant combinator is *not* checked by this rule.
14
15 Also, `+` and `-` signs within `:nth-*()` arguments are not checked (e.g. `a:nth-child(2n+1)`).
16
17 ## Options
18
19 `string`: `"always"|"never"`
20
21 ### `"always"`
22
23 There *must always* be a single space after the combinators.
24
25 The following patterns are considered violations:
26
27 ```css
28 a +b { color: pink; }
29 ```
30
31 ```css
32 a>b { color: pink; }
33 ```
34
35 The following patterns are *not* considered violations:
36
37 ```css
38 a + b { color: pink; }
39 ```
40
41 ```css
42 a> b { color: pink; }
43 ```
44
45 ### `"never"`
46
47 There *must never* be whitespace after the combinators.
48
49 The following patterns are considered violations:
50
51 ```css
52 a + b { color: pink; }
53 ```
54
55 ```css
56 a> b { color: pink; }
57 ```
58
59 The following patterns are *not* considered violations:
60
61 ```css
62 a +b { color: pink; }
63 ```
64
65 ```css
66 a>b { color: pink; }
67 ```