- From: Tomek Wytrębowicz <notifications@github.com>
- Date: Wed, 23 Mar 2016 02:57:51 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Wednesday, 23 March 2016 09:58:13 UTC
We do have created many custom elements (with shadow DOM v0) that acts as a containers for any content. It would be great if we could be able to achieve same functionality with v2, and to be able to do declaratively something like: ```html <my-fancy-container> <!-- , my-app-layout or any other element that should consume variaty of different elements --> <h1 slot="header">Goes to `slot name="header"`</h1> <div>Any</div> <span>other</span> <p>element will be distributed where `slot`(?) or any other replacement for `content` without `select` attribute is</p> </my-fancy-container> ``` With v0 we were able to to it simply with: ```html <!-- shadow root --> <div class="makeContainerLookFancy"> <div class="addUnicornToTheHeader"><content select="[slot=header]"></content></div> <content></content> </div> ``` Personally I think it's not a duplicate of imperative API, as it would be great to be able to do something that simple declarative way. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/343#issuecomment-200274847
Received on Wednesday, 23 March 2016 09:58:13 UTC