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

Just in case if someone misses in Constructable Stylesheet Objects,

ShadowRoot now has adoptedstylesheets:
https://wicg.github.io/construct-stylesheets/index.html#dom-documentorshadowroot-adoptedstylesheets

We can use this new primitives if we want to style nodes in shadow tree (of a custom element) in a cheap way.

e.g.  We can add a style to (shadow root's) adoptedStyleSheets in CustomElement's connectedCallback after attaching a shadow tree to the custom element there.


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

Received on Wednesday, 17 October 2018 08:44:37 UTC