:has()
selector
is way more than a “Parent Selector”
⚠️ Your browser does not support the CSS
:has()
selector so this demo won't work. Please try Safari TP 137.
figure:has(figcaption) img {
outline: 10px dashed red;
}