- From: Preet <notifications@github.com>
- Date: Tue, 24 Sep 2019 22:38:55 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 25 September 2019 05:39:18 UTC
I respectfully disagree, @domenic. The whole idea of having `<slot>` content is to let the user of the component inject *custom html* inside specified "slots". Component developers do not always have full control about how the component is used - i.e. not in-charge of the application. There is no reason why custom-elements cannot be `inline-block`. Take the `<video>` tag for example. In Chrome, the shadow dom of the element contains lots of `divs`, yet a video element can be inside a `<p>`. In fact, most CMSs often put inline images and videos inside the `<p>` tag. I may want to expose one of these divs as a `slot`, e.g. a custom video controls bar. Maybe a custom video element `my-video` that overlays the slotted html on top the video with some opacity - overlaid text or gifs or what not. I could tell people using `my-video` element to not use inside a <p> because it is not *designed* to do so, but that sucks. I understand the reasons why solving this is hard, but I do not think it's poor design, or something that WCs should not strive to solve. The whole idea of extending the HTML should not only be for blocked content. -- 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/630#issuecomment-534861191
Received on Wednesday, 25 September 2019 05:39:18 UTC