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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 25 Mar 2013 12:23:34 -0700
Message-ID: <CAAWBYDCBv86KDgWSQ=2CjokWkJhVamR04OtiNgOjP7dD0Gnwew@mail.gmail.com>
To: Dimitri Glazkov <dglazkov@google.com>
Cc: "www-style@w3.org" <www-style@w3.org>, Steve Orvell <sorvell@google.com>
On Mon, Mar 25, 2013 at 11:39 AM, Dimitri Glazkov <dglazkov@google.com> wrote:
> Good time of day, my stylish colleagues!
> While using Shadow DOM's ::distributed pseudo element function, Steve
> (cc'd) stumbled into an interesting use case: he needs to select
> precisely the elements that are distributed to the insertion point,
> but not their descendants. The naive ::distributed(*) selects elements
> and their descendants, inclusively.
> It seems that we need a way to refer to the insertion point itself in
> the selector. Tab suggested using ":root":
> ::distributed(:root>*)
>  It sounds good to me. How does it sound to you?

The justification being that the set of distributed elements are, from
the point of view of the ::distributed() pseudo-element, a document
fragment, and so :root is sensical for the top-most such elements.
(Just as I feel it would be sensical to match :root against the
top-most elements in a DocumentFragment, if queried via

Received on Monday, 25 March 2013 19:24:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC