W3C home > Mailing lists > Public > www-style@w3.org > November 2008

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

From: Brad Kemper <brkemper.comcast@gmail.com>
Date: Mon, 17 Nov 2008 10:23:32 -0800
Cc: "www-style@w3.org List" <www-style@w3.org>
Message-Id: <B2D50A79-EC17-4453-AA7B-1DD9ED134D6D@gmail.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>


On Nov 16, 2008, at 12:34 PM, Boris Zbarsky wrote:

>> So why would you think it would be less desirable to have  
>> the :focus pseudo-element work in a consistent manner?
>
> Did I ever say that?  Please read what I _did_ say again, carefully.

I have. You implied that window:focus should not be used to indicate a  
focused viewport, because in the DOM it is actually the window object  
that has focus. Ergo, even though body:focus WOULD BE consistent with  
the old, traditional, and familiar way of adding a focus event handler  
to the window via an attribute of the BODY tag, you don't like it  
because it lacks DOM purity. You also derisively suggested that I was  
confused about the difference between the window element of the DOM  
(for which there is no way of specifying focus rules in CSS) and the  
BODY element of HTML mark-up (which does have an actual tag that can  
accept a focus handler).

>> Is there another way of doing this that will select the focused  
>> viewport?
>
> There is not, but perhaps there should be.

What syntax would you prefer then? I kind of like "body:focus", for  
reasons I have explained, but perhaps you have a solution you prefer  
more?
Received on Monday, 17 November 2008 18:27:04 GMT

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