New blogpost: Style a parent element based on its number of children using CSS :has()
https://www.bram.us/2022/11/17/style-a-parent-element-based-on-its-number-of-children-using-css-has/
Chrome Web DevRel at Google (CSS + ChromeDevtools). CSSWG Member. PADI Divemaster. Blogs at bram.us
New blogpost: Style a parent element based on its number of children using CSS :has()
https://www.bram.us/2022/11/17/style-a-parent-element-based-on-its-number-of-children-using-css-has/
Had a task on my todo to write a blog post for a few weeks now, but never got to it. Couldn’t find the right angle, so I kept pushing it forward. – Yes, a writer’s block.
To get the creative juices flowing I started hacking on some code yesterday. Today I wrote the post in 2hrs.
Procrastination works!
Looks like we’ve got some questions to ponder about in the CSSWG:
🤔
Couldn’t resist and added some new test pages to https://interop-2022-viewport.netlify.app to find things out.
Some early results:
You think you’ve got the Viewports thing tackled, but then you suddenly wonder if it all plays nice with `scrollbar-gutter` or not …
Narrator: it doesn’t.