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

Re: [selectors] [css21] :hover pseudo-class

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 26 Jan 2009 08:15:45 -0600
Message-ID: <dd0fbad0901260615g473c0e5bm7ad21e64e784a92a@mail.gmail.com>
To: Giovanni Campagna <scampa.giovanni@gmail.com>
Cc: www-style@w3.org

On Mon, Jan 26, 2009 at 8:01 AM, Giovanni Campagna
<scampa.giovanni@gmail.com> wrote:
> That is the rule for authors. But what about UA? Is the rule either:
> 1) always reflow (and flicker)
> 2) always reflow when mouse moved
> 3) never reflow
> 4) reflow but don't recompute pseudo-classes
> 5) do whatever you want
> Whichever we choose, I think we should write something in the spec, for
> clarity.

#5, and this is written precisely in the spec.  There is *no*
requirement to reflow the document.  There is *also* no requirement to
update :hover if you *do* reflow.  The relevant passages are:

No reflow requirement (what you already quoted):
> User agents are not required to reflow a currently displayed document due to pseudo-class transitions. For instance, a style sheet may specify that the 'font-size' of an :active link should be larger than that of an inactive link, but since this may cause letters to change position when the reader selects the link, a UA may ignore the corresponding style rule.

No :hover update requirement:
> CSS doesn't define which elements may be in the above states, or how the states are entered and left. Scripting may change whether elements react to user events or not, and different devices and UAs may have different ways of pointing to, or activating elements.

So the choice has been made, and it's "whatever you want".  Both
Webkit and Gecko are in compliance here.  Thus my prescription to just
avoid doing things in a :hover which can cause a reflow.  ^_^

Received on Monday, 26 January 2009 14:16:20 UTC

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