Re: [WICG/webcomponents] "open-stylable" Shadow Roots (#909)

Thanks for all of the feedback here. Obviously there's been a lot of smart thinking about this which is absolutely appreciated. 

I think from a consumer standpoint, allowing global style sheets to only be declared once and consumed by scoped components would:

- Open the door to using utility classes in the shadow root without adding bloat from importing it everywhere
- Open the door to using a design system or application + Tailwind (if teams are into that). 
- For me personally, we like utility classes when building pages with design systems for spacing so this would help with that.

Example of utility classes needed within the shadow root is this:

```
  return html`
  <div class="container">
      <div class="u-hide-below-md-bp">
        Content that shows only above medium screen breakpoint
      </div>
      <div class="u-show-below-md-bp">
        Content that shows only below medium breakpoint
      </div>
   </div>
    `;
```

Right now you have to import your utilities in every scoped component to use them. It would be nice to have a place to define globals once and then the components can just automatically use those. There may be a better way of doing that I am not aware of in LitElement. 

I think this and aria attributes not passing through the shadow root to link 2 separate components are two of the biggest snags I've run into that feel a bit limiting or add extra work/thinking while using scoped web components. Once again, I really appreciate all of the work going into making web components better! 


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

Message ID: <WICG/webcomponents/issues/909/1250118200@github.com>

Received on Saturday, 17 September 2022 18:17:59 UTC