Will [:has()](https://developer.mozilla.org/en-US/docs/Web/CSS/:has) make it to your reference? It’s still behind a flag in Firefox, but the other modern browser are ready for using it:  See: https://caniuse.com/?search=has