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

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.  ^_^

~TJ

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