Re: [WICG/webcomponents] Web components should be able to easily adapt to the host page while maintaining enapsulation (Issue #986)

It feels that we are not speaking the same language, or that I'm not understanding very well the motivations for this request. Let me try to provide an example (similar to what I mentioned above), and you can tell us exactly that the problems are:

```html
<body>
     ...plenty of markup... with different levels...
     <x-gallery>
         <x-gallery-image></x-gallery-image>
     </x-gallery>    
     <x-carousel>
           <x-carousel-image src="1.jpg"></x-casousel-image>
           <x-carousel-image src="1.jpg"></x-casousel-image>
           <x-carousel-image src="1.jpg"></x-casousel-image>
     </x-carousel>
     ...more markup --- all owned by document...
</body>    
```

We can assume that:

1. `<x-gallery>` is also showing buttons to move prev/next image inside its shadow as default content for prev and next slots.
2. all the wiring between all the elements is happening in JS (selection of images, updates of the Dom, etc).
3. all elements in the example above belong to document, e.g.: elm.getRootNode() === document.
4. all custom elements are exposing parts of any piece of their relevant shadow's markup.
5. css used by the custom elements in the example above are relying on css variables/properties to control the theme aspect of them.
6. all custom elements used by custom elements in the example above are replaceable via slots.
7. all relevant custom elements used by custom elements in the example above are marked with parts, and are forwarding relevant parts as well.
8. `<x-carousel>` can be replaced with `<x-dots><x-dot>...` instead, and the same principles apply for mobile.

Now, based on those assumptions, what exactly is what you're asking, and why?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/986#issuecomment-1456847517
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/986/1456847517@github.com>

Received on Monday, 6 March 2023 19:42:03 UTC