.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / selector-pseudo-class-whitelist / README.md
1 # selector-pseudo-class-whitelist
2
3 Specify a whitelist of allowed pseudo-class selectors.
4
5 ```css
6   a:hover {}
7 /** ↑
8  * These pseudo-class selectors */
9 ```
10
11 This rule ignores selectors that use variable interpolation e.g. `:#{$variable} {}`.
12
13 ## Options
14
15 `array|string|regex`: `["array", "of", "unprefixed", "pseudo-classes" or "regex"]|"pseudo-class"|/regex/`
16
17 If a string is surrounded with `"/"` (e.g. `"/^nth-/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^nth-/` will match `nth-child`, `nth-last-child`, `nth-of-type`, etc.
18
19 Given:
20
21 ```js
22 ["hover", "/^nth-/"]
23 ```
24
25 The following patterns are considered violations:
26
27 ```css
28 a:focus {}
29 ```
30
31 ```css
32 a:first-of-type {}
33 ```
34
35 The following patterns are *not* considered violations:
36
37 ```css
38 a:hover {}
39 ```
40
41 ```css
42 a:nth-of-type(5) {}
43 ```
44
45 ```css
46 a:nth-child(2) {}
47 ```