Re: [w3c/webcomponents] Make custom elements w/ shadowRoot { display: contents } by default (#723)

It's plenty of easy to just write a class that automatically creates a shadow root for your instances. Making it default is not necessary; I've custom elements that don't need a shadow root, they only render themselves differently and distributing outer children to inner roots is not part of that custom rendering.

A good example in the wild is A-Frame. Those elements don't use Shadow DOM at all, they are only a means to specify WebGL scenes (and so are [my elements](http://infamous.io)).

But anyhow, `display: contents` will help solve issues like for example components that [want to render two `<tr>` elements](https://stackoverflow.com/questions/37208588/polymer-custom-element-containing-table-cells) and that otherwise interfere with the browser's legacy table rendering without `display: contents` (or, at least, I hope this new style lets us fix this problem).

[React added "Fragments"](https://reactjs.org/blog/2017/11/28/react-v16.2.0-fragment-support.html) to solve this problem, while [Vue removed multi-root components](https://github.com/vuejs/vue/issues/7088#issuecomment-358100389) which unfortunately introduces the problem into Vue.

-- 
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/723#issuecomment-358116067

Received on Tuesday, 16 January 2018 21:40:47 UTC