CSS :focus-within Selector
Example
.example:focus-within {
font-weight: bold;
color: red;
}
Meaning
The :focus-within selector matches an element if the element or any of its descendants are focused.
Version: CSS3
Standard Syntax
:focus-within {
css declarations;
}
Browser Support
The numbers in the table specify the first browser version that fully supports the property.