DEV Community

loading...

Discussion on: 10 Useful and Hard-To-Remember CSS Selectors

Collapse
maxgreive profile image
Max Greive

What I also find really useful: :nth-child(-n + 3) for selecting the first three children

Collapse
markmercier profile image
Mark

Holy crap - the idea of using negative values for n has never even occurred to me! Time to refactor a whole bunch of SASS…