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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 27 Mar 2013 09:37:18 -0700
Message-ID: <5153203E.1040001@inkedblade.net>
To: www-style@w3.org
On 03/27/2013 08:25 AM, Tab Atkins Jr. wrote:
> On Tue, Mar 26, 2013 at 8:55 PM, Hayato Ito <hayato@google.com> wrote:
>> I have one concern for the naming of ':root'.
>>
>> I am afraid that It might be misleading that ':root' matches
>> 'top-level elements in the distributed set' rather than 'insertion
>> point' itself.
>> There are multiple such roots. That's not intuitive for me. ':root' is
>> likely to imply 'insertion point' itself because it's *root* of such
>> elements.
>>
>> So instead of reusing ':root' in this context, how about having a more
>> intuitive name, like ':child-of-shadow-host' or something?
>
> 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?
>
> I'm personally okay with :root meaning "an element without a parent in
> this view of the tree".

There are plenty of uses for :root, e.g. in the UA style sheet or
some other author-level default-type style sheet, that should not
be triggered by shadow dom children.

See e.g.
   http://www.w3.org/TR/css-text-decor-3/#default-stylesheet
Those rules would cause problems under your proposal.

So I think you should come up with a different solution to this.

~fantasai
Received on Wednesday, 27 March 2013 16:37:47 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 27 March 2013 16:37:48 UTC