W3C home > Mailing lists > Public > www-style@w3.org > July 2011

Clarification of :hover and :active

From: Shane Stephens <shans@google.com>
Date: Tue, 5 Jul 2011 11:20:56 +1000
Message-ID: <CAGTfzwS4-Q-XCPidnSjXVuNawXsw54RAVsMSfqOypt+QKnKKcA@mail.gmail.com>
To: www-style list <www-style@w3.org>
Currently Gecko and WebKit do different things with this:

<style>
#button:hover:active {background: green;}
#button:active {background: blue;}
</style>
<div id="button">Div button is div</div>

Gecko changes the background to blue when you click on the div and
then drag out; WebKit leaves the background blue.

The specification doesn't really say which one is correct - in
particular "The :hover pseudo-class applies while the user designates
an element with a pointing device" (from
http://www.w3.org/TR/css3-selectors/#the-user-action-pseudo-classes-hover-act)
seems to leave both behaviors open.

Is this intended to be left up to implementors?

Cheers,
    -Shane
Received on Tuesday, 5 July 2011 01:21:21 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:42 GMT