Re: [csswg-drafts] [CSS Import Once] @import-once, or some syntax for importing a stylesheet only once (#6130)

@trusktr Can you clarify how CSS Modules have the same behavior as the proposed `@import-once`.

If I am reading the relevant specifications correctly and after some testing I don't see how they are similar.

```html
<script type="module">
 import a from './a.css' assert { type: "css" };
 import b from './b.css' assert { type: "css" };
 document.adoptedStyleSheets = [a, b, a];
</script>
```

This applies `a` twice and in the same order as the array.
It doesn't only apply the first `a`.

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6130#issuecomment-1968751660 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 28 February 2024 11:08:46 UTC