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

On Nov 17, 2008, at 3:50 PM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> Brad Kemper wrote:
>> I did try HTML:focus in Firefox and Safari. It didn't work.
>
> Right.
>
>> Can you propose wording that would make supporting :root:focus a  
>> MUST for applying to when the viewport has focus (and HTML:focus  
>> for when an HTML document's window has focus)?
>
> I don't think :root:focus is the right way to do this.  Again,  
> because it already means something, and its behavior would change  
> all of a sudden.

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? 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?


> As I said, I'd be happy with a new syntax that does not overload  
> existing selector syntax for this.
>
> -Boris

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? 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? 

Received on Tuesday, 18 November 2008 01:47:35 UTC