-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style scoping bug when moving to v0.11.x #154
Comments
I guess the clearer description is that if you style using :host in a component and you're using that component inside another (via a slot) then the :host css for that component makes its way into the parent somehow. |
I just noticed the same behavior. Looks like the scoping of the styles is "scoped" to the outer parent component, meaning that things like <style webc:scoped>
div {
color: red;
}
</style> suddenly have nasty side-effects if you're working with nested webc components |
apologies, I think this may be the regression introduced in v0.11 and fixed with #152 but I will investigate further. |
I did confirm that this is fixed by #152 with the test case you supplied, thank you! Shipping with v0.11.2 today. |
Thanks @zachleat! Killing it as always 🚀 |
Thank you @rijkvanzanten!! |
Given two webc components
c-red.webc
c-blue.webc
and their usage:
page.webc
Prior to v0.11
would result in:
but after moving to v0.11
it results in the same html but extra/borked css styles, it seems like the :host selector leaks upwards (if that makes any sense).
The text was updated successfully, but these errors were encountered: