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

First off, The performance problem we're trying solve here is that a custom element with a custom style has to attach a shadow root and create a style element in every instance. I've never heard of concrete use cases which necessitates an API to apply a set of style rules to some builtin elements that are not met by inline style attributes or style elements without violating the encapsulation of shadow trees. Anyone proposing to add such an API should enumerate a list of concrete (not theoretical) use cases for which such an API is needed.

Second off, the reason modeling it as a style element inside a shadow tree came up was to avoid introducing a new cascading order in addition to the ones we added for shadow trees. Introducing a new cascading order is **extremely expensive** and we'd most certainly not support such a proposition. That's completely orthogonal to what kind of API is needed.

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

Received on Thursday, 8 March 2018 09:41:59 UTC