W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css4-selectors] Focused descendant pseudo class

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 25 Jan 2012 13:21:37 -0800
Message-ID: <4F207261.3000700@inkedblade.net>
To: www-style@w3.org
On 01/25/2012 12:47 PM, Lea Verou wrote:
> On 25/1/12 22:33, Daniel Tan/BoltClock wrote:
>> I don't think that's what he meant.
>>
>> The way I see it, he's asking to apply the style to the submit input if
>> any of the form's descendants have focus. What your rule is doing is
>> applying the style to the form if the submit input has focus.
>>
>
> Ah, right, I somehow missed the description.
> Yes, what he is suggesting is a very common use case and as far as I can
> see, doesn't seem to be addressed in Selectors 4 in any way.

It would be if I removed the "compound selectors only" restriction in
:matches() and :not(), which I'm thinking I should just go ahead and
do since everyone's coming up with use cases for it...

The selector would then be

   form:matches(! > input:focus) input[submit] { display: none; }

~fantasai
Received on Wednesday, 25 January 2012 21:22:11 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:49 GMT