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

Thanks.
Style rules added in `document.adoptedStyleSheets` are only applied to an element in a document tree.
Custom elements in other trees, e.g. shadow trees, wouldn't get styled.

We have to add style rules to every node trees' `adoptedStyleSheets`, which is impractical, I think. The author of custom elements can't control how they are used and where they are used. If the user of custom elements forget to add style rules to some node tree's `adoptedStyleSheets`, the custom element in the tree wouldn't get styled.

For the latter part, https://github.com/w3c/webcomponents/issues/769 could be related.


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

Received on Wednesday, 7 November 2018 02:14:53 UTC