If you haven’t checked in on CSS’s newer and more advanced selectors for a couple of years, come see what you’ve been missing! Where once CSS selectors formed the “tradie’s tool belt” of every front-end developer, these days reliance on preprocessors like Sass and sophisticated template frameworks leads most developers to grab the same hammer to solve every problem: class selectors.
Kevin Yank will take you on a whistle-stop tour of the CSS selector landscape, from surprising new tricks in trusty standbys like attribute selectors, to enticing (and occasionally heartbreaking) glimpses of the future like :matches and :has.
CSS selectors allow us to point to parts of our document and say, “I want to control how you look”.
There is very little that is new in CSS Selectors today, and what is being made available by the standards body is more like paper clips and rubber bands than the power tools we want.
We are not making the best use of selectors we do already have, and the selectors we do have can be used in new and clever combinations to deliver greater control and create desirable effects.