blob: b1c8fd4499975852cd7154ed871d82f0d2608ae9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# css
## selector
`.moose` element with class
```html
<div class = "moose"></div> // selected
<div class = "bar"></div> // NOT selected
```
`.moose.bar` element with multiple classes
```html
<div class = "moose bar"></div> // selected
<div class = "bar"></div> // NOT selected
```
`.moose .bar` descendant element with classes
```html
<div class = "moose">
<div class = "bar"></div> // selected
</div>
<div class = "bar"></div> // NOT selected
```
`p` specific element
```html
<p></p> // selected
<div></div> // NOT selected
```
`p.bar` specific element with class
```html
<p class = "bar"></p> // selected
<p class = "foo"></p> // NOT selected
```
`p,div` any element
```html
<p></p> // selected
<div></div> // selected
<a></a> // NOT selected
```
`div p` descendant element of other element
```html
<div><p></p></div> // selected
<div><ul><p></p></ul></div> // NOT selected
```
`div > o` direct descendant element of other element
```html
<div><p></p></div> // selected
<div><ul><p></p></ul></div> // NOT selected
```
|