Quick Win
Style one element based on another
Use the :has() pseudo-class to select a parent based on its child.
Published
Use the :has() pseudo-class to select a parent based on its child.
.card:has(img) {
border: 2px solid var(--accent);
}:has() enables powerful parent-child styling in native CSS.