Pseudo-Class and -Element Selectors
Chapter 3
Figures
- Styling the root element
- Selecting images that are only children inside links
- Selecting images that are only children inside links
- Selecting images that are the only sibling of their type
- Styling first children
- Styling last children
- Selecting first-of-type tables
- Selecting last-of-type tables
- Styling second children
- Styling every third list item
- Styling every other table row
- Combining patterns of :nth-child() and :nth-last-child()
- Selecting the even-numbered links
- Selecting both :nth-child and :nth-of-type table cells
- Styling a fragment identifier target
- Highlighting a form element that has focus
- Selecting elements using :focus-within
- Changing layout with dynamic pseudo-classes
- Styling enabled and disabled UI elements
- Styling checked and indeterminate UI elements
- Styling valid and invalid UI elements
- Styling list items that don’t have a certain class
- Styling elements with a certain class that aren’t list items
- Styling header cells outside the table’s head area
- Using :matches-any to select elements
- Using :has() to select elements
- A fragment of a document’s structure
- To has and has not
- The ::first-letter pseudo-element in action
- The ::first-line pseudo-element in action
- Styling the button in a file submission input
- Inserting content before an element
- Selection styling
- Targeted text styling