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

Reading back through the earlier discussion (especially https://github.com/WICG/webcomponents/issues/909#issuecomment-786970305 and https://github.com/WICG/webcomponents/issues/909#issuecomment-791628536), it seems like making global stylesheets adoptable would be the simplest and least controversial change:

```js
this.shadowRoot.adoptedStyleSheets = [...document.styleSheets]
```

This would solve the issue of needing to crawl `<link>`s, `<style>`s, etc. Admittedly you would still need a way to observe changes to the global styles, but I'm not sure this is a really common use case? But if it is, then maybe it could be solved with a global DOM event to indicate that `document.styleSheets` has changed (or something).

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

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

Received on Saturday, 17 September 2022 16:51:40 UTC