W3C home > Mailing lists > Public > www-style@w3.org > January 2009

[selectors] [css21] :hover pseudo-class

From: Giovanni Campagna <scampa.giovanni@gmail.com>
Date: Mon, 26 Jan 2009 14:17:11 +0100
Message-ID: <65307430901260517t475d3d52x48204304749cc691@mail.gmail.com>
To: www-style@w3.org
Look at this CSS example:

#my-div {
#my-div:hover {

As you see, when the target is hovered, it is shrinked. The interesting fact
is that after pseudo-class application, the mouse pointer maybe outside of
the box, so the element won't be hovered any more, so it will get back
"default" width and height, so it will be hovered, etc.
That is, the current :hover definition may cause an infinite loop, a
flashing red box in my example.
Also some implementations (WebKit) apply :hover only when the mouse is
moved, other (Gecko) instead apply them continuosly.
Is this the expected behaviour?

CSS21 says:
"User agents are not required to reflow a currently displayed document due
to pseudo-class transitions".

Does this mean that any box-model related property (any property that is
applied after reflowing) is ignored in a selector with :active, :hover or

Will something be included also in CSS3 Selectors?

Received on Monday, 26 January 2009 13:17:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:23 UTC