-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Calling updateStyles before an element is attached does nothing and is confusing #3530
Comments
This appears to be the result of some flakiness that we've been seeing for quite a while, where styles are not always being applied. An repro of what has stymied us for a few months is: Calling updateStyles on property change seems natural, I disagree that this should produce a warning (especially since the net effect appears to work after the element is attached). The problem is that when the element is first attached styles are all updated, but after the element is re-attached, they are not. |
It is surprising to me that this P0 bug has not been updated in several months. What's the latest here? |
Sorry for the delay. We are working on this issue. I believe it should be enough to ensure that if |
…ched, invalidate its styling so that when it is attached, its custom properties will be updated. Also fixed a related issue with scope style cache disablement when :host function rules are used: * "property prepping" and decoration are now after static shimming so that transformed selectors are available to calculate :host function, * the detection of :host function properly accounts for type extension, * since "property prepping" was moved after shimming, apply shim was separated from this and moved before shimming so that its output can be used there.
Fixes #3530. When `updateStyles` is called and an element is not atta…
Calling
updateStyles
manually provokes the custom properties shim to update. Calling it before an element is attached has no effect. This is confusing to users and should either be fixed or produce a warning. For example, a developer might write an observer that callsthis.updateStyles
. This needs to be gated on attachment to function properly.The text was updated successfully, but these errors were encountered: