Pseudo classes

CSS Pseudo classes

:has()

:has( <forgiving-relative-selector-list> )

Has any of the relative selectors

h1:has(+ h2) {
  margin: 0 0 0.25rem 0;
}

tr:has(input:checked) {
  background: blue;
}

tr:has(.input_checkbox_class:checked) {
  background: red;
}

Reference