- From: Nolan Lawson <notifications@github.com>
- Date: Sat, 17 Sep 2022 09:51:26 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 17 September 2022 16:51:40 UTC
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