Re: [w3c/webcomponents] I find <slot slot="..."> confusing (#514)

To add some data to this discussion: based on the experiences of the Basic Web Components project, we think it’s going to be quite rare to assign a slot directly to another slot.

* The vast majority of the components we write have only one slot, in which case no slot attribute will be specified. (The slot attribute is only required when targeting a specific slot in a component that has multiple slots.) We have approximately 50 or so components in our library in various stages of development, and of those, it looks like 3 will have multiple slots. We think the ability to support multiple slots is critical for certain situations, but in practice, at least, those are not typical. YMMV.
* Even in cases where you want to assign to a named slot, you’re often not assigning a slot element, but something else. That is, even when the slot attribute is used, it’s not applied directly to a slot element.
* In the rare cases when we’ve encountered situations where we will want to place a slot 1 in another component’s named slot 2, we will often want to wrap slot 1 in a containing element. Sometimes we want to add some additional elements to the ones defined by slot 1, or we may want to apply styling to the containing element. In cases like these, the slot attribute doesn’t end up being applied to a slot element:

```
<div id=“container" slot=“slot2”>
  … some elements …
  <slot name=“slot1”></slot>
</div>
```

Given all of the above, we think occurrences of <slot name=“slot1” slot=“slot2”> will be rare in practice.

> On Jun 7, 2016, at 2:03 AM, Trey Shugart <notifications@github.com> wrote:
> 
> As a consumer of the spec, I never found <slot slot> to be confusing in terms of naming. The confusing part for me was: what would happen when a slot is slotted into a slot? It seems instinctive that a slot attribute would correspond to a <slot> node. I'd have to have read documentation to find out what fill (or any other attribute for that matter) would mean.
> 
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub <https://github.com/w3c/webcomponents/issues/514#issuecomment-224222015>, or mute the thread <https://github.com/notifications/unsubscribe/AAFQe2nKo9T7AZMuyR2k8ZDP2FLjC8Aoks5qJTPugaJpZM4Iu3tG>.
> 



---
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/514#issuecomment-224408529

Received on Tuesday, 7 June 2016 20:46:03 UTC