Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
:first-child i === 0
:last-child i === arr.length - 1
:only-child arr.length === 1
:nth-child(even) i % 2
:nth-child(odd) !(i % 2)
:nth-child(n) i === n - 1
:nth-last-child(n) i === arr.length - n
:nth-child(-n+3) i < 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment