Day 6: the :has() pseudo-class

from blog Manuel Matuzović - Blog, | ↗ original
↗ original
:has() allows you to check whether a parent element contains specific children.In the following example, each .form-item that contains/has a child with the aria-invalid attribute set to “true” displays text in red color. (currently only in Chrome/Edge 105+ and Safari 15.4+) .form-item { --color: #000; color: var(--color); } input { border:...