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

Re: [css4-selectors] Focused descendant pseudo class

From: Brian Kardell <bkardell@gmail.com>
Date: Wed, 25 Jan 2012 17:34:09 -0500
Message-ID: <CADC=+jewYBo0Ou7VLVWOQ_C39p7bvphKmz4eFD_LwJmj4oyWtw@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
! Or $   ?

:-)
On Jan 25, 2012 4:23 PM, "fantasai" <fantasai.lists@inkedblade.net> wrote:

> 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 22:34:58 GMT

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