body:has(.this) .that {
display: none;
}
doesn’t seem to work properly. If .this
is removed and/or added to the DOM, .that
isn’t repainted automatically. :-(
It is here on codepen Modern CSS only column hover
]]>:has
lets us have :focus-visible-within
also, even though its not a thing.
:has(*:focus-visible)
Yep, :has()
is pretty useful. And I see quite a few clever uses of it too… It’s not just a parent selector as many call it.
Also, I’ve found :is()
to be useful in writing styles for a polyfill for the Popover API. Using it reduces the specificity, making any other CSS rules override what I’m giving that’s basically fulfilling the role of browser styles.