Re: [w3c/webcomponents] Provide a lightweight mechanism to add styles to a custom element (#468)

> ```js
> customElements.define("my-button", MyButton, { styles: `
>   * { display: inline-block; }
>   *[disabled] { color: gray; }
> `);
> ```

That seems funky for some reason. 

But, while we're at it, we may as well decide to allow passing [CSSStyleSheet(text, options)](http://tabatkins.github.io/specs/construct-stylesheets/), something like

```js
const sheet = new CSSStyleSheet(text, options)
customElements.define("my-button", MyButton, {
  styles: sheet
);
```

---
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/468#issuecomment-237025439

Received on Tuesday, 2 August 2016 20:03:56 UTC