.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / selector-id-pattern / README.md
1 # selector-id-pattern
2
3 Specify a pattern for id selectors.
4
5 ```css
6 .foo, #bar.baz a, #hoo[disabled] { color: pink; }
7 /**   ↑           ↑
8  * These id selectors */
9 ```
10
11 ## Options
12
13 `regex|string`
14
15 A string will be translated into a RegExp — `new RegExp(yourString)` — so *be sure to escape properly*.
16
17 The selector value *after `#`* will be checked. No need to include `#` in your pattern.
18
19 Given the string:
20
21 ```js
22 "foo-[a-z]+"
23 ```
24
25 The following patterns are considered violations:
26
27 ```css
28 #foop {}
29 ```
30
31 ```css
32 #foo-BAR {}
33 ```
34
35 ```css
36 div > .zing + #foo-BAR {}
37 ```
38
39 The following patterns are *not* considered violations:
40
41 ```css
42 #foo-bar {}
43 ```
44
45 ```css
46 div > .zing + #foo-bar {}
47 ```
48
49 ```css
50 .foop {}
51 ```
52
53 ```css
54 [foo='bar'] {}
55 ```