advanced selectors

master
Matt Huntington 8 years ago
parent 3b79f6314b
commit 19a17b548a

@ -13,7 +13,7 @@ Advanced selectors help eliminate extra classes. They provide no new functional
### Family Selectors
- *
- `*`
- selects everything
- useful for when you want to style everything. Can add an optional ancestor for more specificity
@ -25,7 +25,7 @@ Advanced selectors help eliminate extra classes. They provide no new functional
<span class="style-me">content</span>
</div>
```
- >
- `>`
- selects an immediate child
- if you want to add styling to just a child, but the parent has descendants that are similar to child
@ -39,7 +39,7 @@ Advanced selectors help eliminate extra classes. They provide no new functional
</li>
</ul>
```
- ~
- `~`
- sibling selector
- only selects subsequent siblings, not preceding siblings
@ -51,7 +51,7 @@ Advanced selectors help eliminate extra classes. They provide no new functional
</ul>
<p>paragraph</p>
```
- +
- `+`
- immediate sibling selector
- only selects first sibling

Loading…
Cancel
Save