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

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 UTC