Re: [css3-selectors] Elements that can have :focus pseudo-class

Brad Kemper wrote:
> Does it mean anything that makes a difference? Are you concerned that 
> people will have rules in their stylesheets with :root:focus where it 
> doesn't currently have any effect?


> Isn't :root supposed to always refer 
> to the viewport, for all intents and purposes, or at least insomuch as 
> where it represents a focusable object?

No, :root refers to the documentElement of the document.

> I don't see the danger. Unless 
> you are saying there may be some document language that uses CSS that 
> has both focusable roots and focusable viewports at the same time, that 
> do not represent the same thing on the screen. Is that the concern?

That would certainly be a concern too, yes.

> OK so there is a difference between the root of a documentvand the 
> viewport it is in, but it seems to be a pretty insignificant difference 
> for the purposes of :focus. Is it overloading it any moreso than the way 
> overflow and background have special meanings for the body element?

Those work that way for backwards compat reasons, basically.  I don't 
know that anyone is particularly happy about the way they work.

> I don't see why it's OK for overflow on a BODY to apply to the viewport, 
> but we can't even say that :focus on the root of the document applies to 
> the viewport? In both cases it is applying a CSS property to the 
> viewport instead of the specified document object. At least with root 
> there will be only one per viewport. Or an I wrong about that?

Well, one is applying a CSS property while one is matching a CSS 
selector.  They're actually pretty different operations...

My real concern here really is the backwards compat aspect.  Changing 
things that are already interoperably implemented just leads to grief, 
in my experience.


Received on Tuesday, 18 November 2008 01:58:57 UTC