.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / selector-pseudo-class-blacklist / README.md
1 # selector-pseudo-class-blacklist
2
3 Specify a blacklist of disallowed 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:hover {}
29 ```
30
31 ```css
32 a:nth-of-type(5) {}
33 ```
34
35 ```css
36 a:nth-child(2) {}
37 ```
38
39 The following patterns are *not* considered violations:
40
41 ```css
42 a:focus {}
43 ```
44
45 ```css
46 a:first-of-type {}
47 ```