- From: Westbrook Johnson <notifications@github.com>
- Date: Thu, 30 Dec 2021 11:41:08 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 30 December 2021 19:41:20 UTC
The example of ``` <script type="css" specifier="/foo.css"> :host { color: red } </script> ``` Seems like a large change for developers, would it make a shorter step from historic practices to apply this concept via `<style>` or `<link>`? E.G: ``` <style type="module" src="/foo.css"> :host { color: red } </style> ``` OR ``` <link rel="stylesheet-module" href="/foo.css" /> ``` In this way we could leverage already existing blocking mechanisms while informing the browser not to apply these styles until adopted. It's possible that `link[rel="stylesheet-module"]` might fit right into the `rel="modulepreload"` cache once `assert { type: 'css' }` hit browsers allowing it to leverage even more pre-existing features. Question that applies to both of these approaches, do you expect that values applied to `adopted-styles` or `css-modules` would resolve lazily? E.G. could I list these style in my declarative shadow DOM but then load those sheets in a non-blocking way and still have them apply to the shadow root? -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/939#issuecomment-1003158524 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/939/1003158524@github.com>
Received on Thursday, 30 December 2021 19:41:20 UTC