Enhancement
"Some hover classes are loaded via JavaScript or maybe .jsp either way it makes it hard to style them with a normal element inspector.
- We replace these places with hover pseudo-classes." (see #24071)
Test
For the user menu in the Modern theme (which can be used to edit settings and logout), the CSS class is not implemented via javascript. It uses a hover pseudo class instead.