- From: Andy Earnshaw <notifications@github.com>
- Date: Wed, 30 Mar 2016 01:33:54 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Wednesday, 30 March 2016 08:34:25 UTC
I really like this idea too, though it might be worth having a custom element-specific stylesheet instead:
```javascript
let sheet = document.createElement('style');
sheet.textContent = ':host { display: block; }';
customElements.define("cool-element", CoolElement, { styleSheet: sheet });
```
This way you can retain a reference and add to, remove or modify the css rules in a familiar manner later if required.
---
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-203321502
Received on Wednesday, 30 March 2016 08:34:25 UTC