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

On Tue, Apr 2, 2013 at 8:37 PM, Hayato Ito <hayato@google.com> wrote:
> Let me clarify the question.
>
> Given the following tree:
>
> <div id='shadowhost'>
>   <div id='first-div'></div>
>   <div id='second-div'></div>
> </div>
>
> Then, a shadow root of #shadow-host has <style> and <content> as follows:
>   <style>
>      content::distributed(> :first-child) { ... }
>   </style>
>   <content select='#second-div'></content>
>
> Does the selector, "content::distributed(> :first-child)",  match a
> node of '#second-div' in this case?
>
> There are two different points of views.
> (A) #second-div is the second child in the original tree.
> (B) #second-div is the first child of the insertion point *virtually*.
>
> We should honor (B) in this case, shouldn't we?

I support (B), yes.  In the tree *as the ::distributed()
pseudo-element sees it*, #second-div is the first child.

~TJ

Received on Wednesday, 3 April 2013 06:41:21 UTC