W3C home > Mailing lists > Public > www-style@w3.org > June 2003

Re: Scope of :hover

From: Ernest Cline <ernestcline@mindspring.com>
Date: Sat, 07 Jun 2003 16:19:22 -0400
To: www-style@w3.org
Message-ID: <3EE2108A.18801.BFFD78@localhost>

Douglas Livingstone wrote:

> > It's sensible that only interactive elements can accept the :hover
> > pseudo-class. These are the only elements that can be "clicked on" to do
> > something, and a change of colour/underline etc almost always implies a
> > link.
> This is only true today because :hover only works on some elements in IE. 
> Dropdown menus, methods to display more information about objects etc have 
> already been written for browsers supporting :hover on all elements.
> For example: http://www.meyerweb.com/eric/css/edge/menus/demo.html
> These forms of display have previously only been possible with JavaScript 
> etc, the use of :hover is an important tool for a cleaner web.

The example given while nice, has a problem, since it makes use of the 
display property as well as other properties that affect layout.

To quote from the CSS2 spec [Section 5.11.3]:
  User agents are not required to reflow a currently displayed
  document due to pseudo-class transitions.

Hence, unless CSS3 is going to require that reflow will be required (a 
bad idea as allowing :hover to affect reflow is a potentially very 
heavy computational burden, this means that a fully conforming CSS 
implementation might not be able to handle it, even if it allows :hover 
to be applied to any element.

Getting dropdown menus to function via CSS is an interesting idea, but 
I have yet to see an example that that would work in a conforming CSS 
user agent that chooses to not allow :hover to cause reflow.  Can 
anyone provide some examples that do work without having :hover affect 
Received on Saturday, 7 June 2003 16:19:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:07 UTC