:focus

Since UXP v3.0

Matches when the selected element is focused. An element is considered to be active when the element has keyboard focus.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/:focus

Example:

input:focus {
    border: 1px solid red;
}

Quirks and Exceptions