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

> But that's not how stylesheets would work in a Shadow root. If you had a #host selector that hypothetically matched the host, then it would override any :host selector, as it'd be more specific. 

@emilio Yeah I should have been more clear, in the example case since there is no specificity difference then it is resolved by the order. In the case you mentioned where the default style has higher specificity than styles in the shadow root, the default style would win.

> What's the specificity of the selectors in that stylesheet expected to be? Is it cascaded in a separate step instead?
I'm not sure I understand your first question, but it is using the shadow cascading order, so default style is in the same step as shadow styles.

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

Received on Thursday, 18 October 2018 12:48:09 UTC