Is the ":focus" selector valid?

Is the ":focus" selector valid?

I've noticed that the ":focus" selector does indeed work, though it is not documented anywhere. Is it safe to use? Can anyone explain this?

And in a somewhat related question, is it possible to override a core selector? For example, is it possible to override the ":empty" selector to perform an additional checks in addition to checking whether or not an element is empty? I know that selectors can be chained together, but I'm wondering if it's possible to change the default behavior of a selector instead.