Pseudo classes
CSS Pseudo classes
Categories:
: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
- :has() - CSS: Cascading Style Sheets | MDN
- The advanced guide to the CSS :has() selector - LogRocket Blog