Re: [webcomponents] Composition Algorithm shouldn't unwrap slots (#308)

Distributed nodes should inherit from the final destination slot, for example if you have the below example given `<slot name="x" slot="y">`, then the nodes should inherit from `<slot name=y>` if it exists, not from slot x. This is important for a number of use cases, for example if your widget expects a heading element, and will style that with a larger font size. Not doing this also adds a significant amount of complexity since there's a number properties which are internally inherited, for example visibility. Adding visibility: hidden to an ancestor of the final destination slot should hide the contents of it.

I don't think the display value of slot elements should be allowed to be overriden, they're omitted from the composed tree, leaving them in violates a fundamental assumption of our engine:

If Node X has a render object, then the parentNode of X in the composed tree also has a render object.

I know that's at odds with display: contents, but display: contents is theoretical and will be very difficult to implement since it violates this assumption. I don't think it's a v1 feature of the spec for sure.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/308#issuecomment-144940913

Received on Friday, 2 October 2015 07:14:37 UTC