which one will be the first?
Please note that there is no such thing as a “CSS event”. However, the behavior is undefined; You can consider changing CSS and JS events at the same time. Relevant specifications CSS 4 Selectors , DOM 3 Events, and HTML 5 indicate similarities between hoverand mouseenter, but do not indicate order. The order of mouse events is specified , but does not apply to pseudo-classes of custom CSS actions.
Are there any deviations from this?
Yes, browsers can implement it anyway. They can change the layout and redraw the page before they trigger JS events, or they cannot. However, this does not really matter.
Is it possible to make them execute in a specific order?
, CSS JS. , (, getComputedStyle(this)) CSS, - . DOM-?.
http://jsfiddle.net/n4Z8H/. (rgb(0, 0, 255), :hover), IE, , .