W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: Shadow DOM Encapsulation

From: Sylvain Galineau <galineau@adobe.com>
Date: Fri, 7 Feb 2014 04:31:24 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: "peter.linss@hp.com" <peter.linss@hp.com>, "<www-style@w3.org>" <www-style@w3.org>
Message-ID: <4D5B4AA1-8C3E-4BFD-93D3-0643C6070827@adobe.com>

On Feb 6, 2014, at 7:02 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Thu, Feb 6, 2014 at 6:54 PM, Peter Linss <peter.linss@hp.com> wrote:
>> On Feb 6, 2014, at 5:23 PM, Tab Atkins Jr. <jackalmage@gmail.com>
>> wrote:
>>> Note also that this isn't quite as easy as it sounds.  When you expose
>>> things, where are they relative to everything else?
>> 
>> They are in the same place as they are defined, the structure is preserved for everything exported.
>> 
>> For example, given the shadow DOM:
>> <component>
>>  <part-one export>
>>    <sub-part-one />
>>  </part-one>
>>  <part-two>
>>    <sub-part-two export>
>>      <sub-sub-part-two />
>>    </sub-part-two>
>>  </part-two>
>> </component>
>> 
>> You'd see it as though it were defined as:
>> <part-one>
>>  <sub-part-one />
>> </part-one>
>> <sub-part-two>
>>  <sub-sub-part-two />
>> </sub-part-two>
> 
> Oof, so then "part-one + sub-part-two" would actually match?  That's
> seems super weird to me.

Itís a bit weird from the component authorís viewpoint because they know about the hidden bits of the tree. But then those are the parts they deliberately chose to expose.

Itís not weird at all for the author styling the component. For them itíd arguably be super-weird if it didnít match.

So, on balance, this seems OK to me.
Received on Friday, 7 February 2014 04:31:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC