I recently had a discussion with a colleague about how the :hover pseudo class selector is generally implemented in browsers. The question concerns what actually happens behind the scenes, when a pointer hovers an element on a website. ":hover on touch devices" is a problem, that has already been discussed exhaustively.
My understanding is, that the :hover selector is implemented to create some convenience when dealing with standard behavior on websites, meaning in the end it triggers mouseover/mouseout events and saves you some lines of tedious JavaScript code.
My colleague on the other hand said there are no events involved. In the end nothing more occurs than a change in the state of an element that gets recognized and handled.
I finally ended up digging the web:
http://www.w3.org
https://developer.mozilla.org
But I did not find any real answer to this question.
So I finally ask the community!
EDIT:
Thanks for the first replies.
But digging even deeper I found this one what makes me think again:
http://www.prowebdesign.ro/how-to-deal-with-hover-on-touch-screen-devices/
If :hover in combination with visibility manipulation triggers a double-tab, which in the end is an event, there still seems to be some connection between states and events. Even if it is buggy behavior.