The problem with a has() selector, according to Tab Atkins, is that means that any DOM mutation will cause the cascade for the entire document to have to be rebuilt, which is much too slow. There's some suggestions that a has-child() selector might be possible, but it still increases the sub-tree that needs its cascade rebuilt from everything under the mutated element's parent, to everything under the mutated element's grandparent, which may still be regarded as too great. So don't hold your breath waiting for support.
A parent selector
.myClass < span { display: block }
it does exist: drafts.csswg.org/selectors-4/#rela... but we still need to wait too long for a tiny support
The problem with a has() selector, according to Tab Atkins, is that means that any DOM mutation will cause the cascade for the entire document to have to be rebuilt, which is much too slow. There's some suggestions that a has-child() selector might be possible, but it still increases the sub-tree that needs its cascade rebuilt from everything under the mutated element's parent, to everything under the mutated element's grandparent, which may still be regarded as too great. So don't hold your breath waiting for support.
But if I was a wizard.. 🧙♂️✨ 😊
Gosh, the many situations where I wished there was a parent selector! 🙃