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

@rniwa I'm trying to imagine the syntax for accomplishing this because the `HTMLStyleElement.sheet` property is `null` until it has been connected: 

```
const sheet = document.createElement('style');
sheet.innerHTML = `* { color: rebeccapurple; }`;
sheet.sheet; // null
document.body.appendChild(sheet); // now this is applied to document.styleSheets
sheet.sheet; // CSSStyleSheet
```

Do you have an example of what that would look like from an author's perspective?

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

Received on Monday, 23 April 2018 16:10:56 UTC