Parent Styling with :has()

Demonstrates styling a container based on the validity of its children using :has(input:user-invalid).

Checking support...

User Profile

Username is required.
Email address is missing or not valid. Enter it in the format you@example.com.