Skip to content
onsuggest
Log in
Article en

Re-Implementing :nth-child() With Modern CSS

Source: CSS-Tricks ·

Combining :nth-child with style queries and sibling-index() to conditionally select child elements. Re-Implementing :nth-child() With Modern CSS originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.

Keyboard shortcuts

Previous discovery
←P
Next discovery
→N
Like
L
Not for me
X
Save
S
Show this help
?
Close
Esc

Shortcuts work on the discovery page.