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

> customElements.defineStyles('some-map-key', CSSStyleSheet | string | href?);

This is an interesting idea!

I'd go with placing styles on the element, NOT the shadow root. I have many custom elements elements that don't have a shadow root, so adding one just for this functionality would be too heavy.

> Why would this be blocked per the constructible stylesheet? 

Yep, doesn't need to be blocked, it can just accept a CSS string for now. And href is not needed, `@import` can be used in the string.

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

Received on Tuesday, 20 February 2018 17:33:18 UTC