The CSS Podcast cover image

61 :has()

The CSS Podcast

00:00

Using CSS for UI Components

You can use has to style things like buttons differently based on their content. Ownership again moves into the presentation tier out of your JavaScript, out of your PHP that's trying to look at this buttons going to have an icon and do something smart. You could just make your buttons and let CSS handle it all. Tilde and plus selectors in selectors are gone now. They're just straight up gone.

Play episode from 15:48
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app