W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [shadowdom]: Using :root to specify the insertion point in ::distributed

From: Hayato Ito <hayato@google.com>
Date: Fri, 29 Mar 2013 13:21:12 +0900
Message-ID: <CAFpjS_0ycvyi7_+y8M8h32Yhu8VaVXPAd-TEBv0+W9kbuGrfJQ@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
I'm okay with scope-relative selectors. Look like it is the most
intuitive for developers.

For reference, scope-relative selectors seems explained here.
http://dev.w3.org/csswg/selectors4/#scoping

I am wondering that is there any actual usage of such scope-relative selectors?
Is this the first-ever case?

The spec says:
> ..., while the similar element.find function defined in the same spec uses scope-relative selectors.

But I could not find such usage of 'find()'.

Looks like we have to update the formal syntax of selector to support
the new syntax as explained in scoped-relative selectors:

>  'allowing them to begin syntactically with a combinator'.

This might be a hard part to implement the new syntax.

On Fri, Mar 29, 2013 at 6:44 AM, fantasai <fantasai.lists@inkedblade.net> wrote:
> On 03/27/2013 09:37 AM, fantasai wrote:
>>
>> On 03/27/2013 08:25 AM, Tab Atkins Jr. wrote:
>>>
>>>
>>> The issue with that is that we run into the exact same problem with
>>> ::shadow() - if you want to select only the top-level elements inside
>>> of a shadow root, what selector do you use?  Do we invent *another*
>>> pseudoclass that's identical except for the name?
>>
>>
>> So I think you should come up with a different solution to this.
>
>
> I thought we had talked about this exact use case before, actually,
> and were planning to use scope-relative selectors to solve it.
> So
>
>   ::distributed(> li)
>
> would select all <li> elements immediately a child of the insertion point.
> I think this makes the most sense.
>
> ~fantasai
>



-- 
Hayato
Received on Friday, 29 March 2013 04:22:00 UTC

This archive was generated by hypermail 2.3.1 : Friday, 29 March 2013 04:22:00 UTC