10 Use-cases for the :has() selector

CSS

1. With checkbox :checked

Lets say we have a checkbox to toggle some functionality anywhere on the webpage

<input id="hide-solutions" type="checkbox" name="hide-solutions" />
body:has(input#hide-solutions:checked) .solutions {
  blur: 0.5;
}