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

So, sugar for this?

```
/* filename: style.css */
:host
{
 background-color: white;
 color: red;
}
```


```
// Filename styles.mjs
const styles = new CSSStyleSheet();
styles.replace("@import url(./style.css)");
export default styles;
```


```
import { styles } from './styles.mjs'

class MyElement extends HTMLElement {
  constructor() {
    this.attachShadow({mode: open});
    this.shadowRoot.adoptedStyleSheets = [styles];
  }
}
```

-- 
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-511330919

Received on Monday, 15 July 2019 09:22:34 UTC