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

Tokyo F2F: There was a consensus to add this feature. The stylesheet would be treated as if it's the first `style` or `link` element inside the shadow DOM of a custom element instance. The shadow root doesn't exist, and `attachShadow` can be called later. In that case, the style defined via custom elements will retain but won't be exposed as one of the stylesheets on `ShadowRoot`.

This feature would work with `styleSheet` of a `style` or `link` element as well so we're not necessarily blocked by the constructible stylesheet.

We need to confirm with CSS WG that `:host` works in this setup.

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

Received on Tuesday, 6 March 2018 05:14:55 UTC