CSS :has() selector is a parent selector

The :has() pseudo-class lets you style a parent based on its children. For example, div:has(> img) selects any div that directly contains an img. No more JavaScript hacks for parent selection!