css sibling selector
Given this HTML, how do I target the
<div data-rehype-pretty-code-title>
only if the SVG with data-language-icon
is present?
I'm guessing some ~
?
3 Replies
i only manage to target the icon and not the title :/
you can do this
or if the svg doesn't need to be the very next child
firefox doesnt seem to support has selector by default yet though :(
https://caniuse.com/css-has
Thanks 🙏