Re: [w3ctag/design-reviews] Declarative CSS Modules and Declarative Shadow DOM `adoptedstylesheets` attribute (Issue #1000)

sorvell left a comment (w3ctag/design-reviews#1000)

@KurtCattiSchmidt Have you considered how future support for adopting non-constructed stylesheets might work, if we can move forward on https://github.com/w3c/csswg-drafts/issues/10013?

This consideration came up for me when [testing](https://lit.dev/playground/#gist=753689bcb54c1aacdbc675f50a0a4fa8)

```html
<script type="importmap">{ "imports": { "bundle": "./bundle.css" } }</script>
<link rel="modulepreload stylesheet" as="style" href="./bundle.css">
<x-foo>
  <template shadowrootmode="open" shadowrootadoptedstylesheets="bundle">      
    <div>x-foo</div>
  </template>
</x-foo>
```

This works and you get a constructed version of the link'd resource. As authored here, another non-constructed version of the stylesheet applies to the containing root. However, if it [becomes possible](https://github.com/w3c/csswg-drafts/issues/10013) to adopt non-constructed stylesheets, how would this be disambiguated in the attribute?

The distinction is currently valuable-ish since if the sheet uses `@import`, the non-constructed version has the imported sheet and the constructed version does not, since these rules are not supported in constructed sheets. However, I think the `@import` restriction [may also be lifted](https://github.com/mozilla/standards-positions/issues/1081#issuecomment-3939916303) in the future.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/1000#issuecomment-3941188617
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/1000/3941188617@github.com>

Received on Sunday, 22 February 2026 15:21:11 UTC