Re: [w3c/webcomponents] CSS Modules (#759)

> These modules certainly do have side effects, and that is part of their design, just like importing a module that declares a custom element.

Attaching global stylesheets simply doesn't work for shadow DOM, so being compatible with ICSS while supporting shadow DOM is not going to happen for any actual CSS modules implementation.

Regarding the verbosity concerns, personally I'd rather just see CSS modules be able to be included directly in HTML when dynamic removal/addition isn't actually required. e.g.:

```html
<!-- Uses the CSS module system and caches the same sheet -->
<style src="./styles.css"></style>

<div class="someClass">
  ...
</div>
```


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

Received on Wednesday, 14 August 2019 01:18:28 UTC