- From: Hayato Ito <hayato@google.com>
- Date: Wed, 3 Apr 2013 12:37:33 +0900
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>
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?
On Wed, Apr 3, 2013 at 10:13 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Tue, Apr 2, 2013 at 5:16 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
>> On 04/02/2013 05:01 PM, Tab Atkins Jr. wrote:
>>>
>>> On Tue, Apr 2, 2013 at 3:01 PM, Dimitri Glazkov <dglazkov@google.com>
>>> wrote:
>>>>
>>>> Using scope-relative approach (which I love), what does
>>>> ::distributed(:scope) represent?
>>>
>>>
>>> Nothing. The scope element is a theoretical construct here
>>> representing a container for all the distributed elements, not a real
>>> element that you can do something with.
>>
>>
>> This makes sense to me, but the key question here is:
>>
>> ::distributed(:first-child)
>>
>> Does that select the first element distributed to that distribution point,
>> or the first of its siblings?
>
> It's the same as ::distributed(:scope > :first-child), so the first element.
>
> (Did you mean "first of its children"?)
>
> ~TJ
>
--
Hayato
Received on Wednesday, 3 April 2013 03:38:20 UTC