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

Re: a:hover and a:active and named anchors

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 31 Jul 2002 18:55:02 +0200
Message-ID: <3D481666.1070008@hixie.ch>
To: Stuart Ballard <sballard@netreach.com>
Cc: www-style@w3.org

Stuart Ballard wrote:
> The general principle that's being violated here was stated by Hixie, I
> believe, as "selectors can't depend on values of CSS properties".

That's absolutely correct.

Selectors cannot depend on properties for several reasons:

1. Fundamentally, selectors are distinct from properties -- you can use them 
separately. Therefore it makes no sense for them to be affected by properties.

2. If properties could affect selectors, you could get infinite loops, as Stuart 
pointed out. (Or, you can say "these properties are not valid if these selectors 
are involved. But that gets very quickly very complicated.)

3. If properties could affect selectors, many optimisations that are currently 
possible would no longer be, meaning browsers would get slower (many UA 
implementors consider this unacceptable).

Note that what _is_ possible is for a property to cause new new elements or 
stylesheets to be introduced into the DOM. However, this is very dodgy, and can 
only work if you are very careful in your design. (XBL does with it's 'binding' 
property, for example.)


 > I'm confused as to how the interaction of "user-focus" and ":focus" [...]

I believe user-focus has gone byebyes.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 31 July 2002 12:55:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:15 GMT