-
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
Lazy-loaded <style is="custom-style">
should trigger Polymer.updateStyles
#3705
Labels
Comments
This also affects the use iron-flex and iron-flex-alignment within an element that is being lazy-loaded.
|
For exposure, we've recently seen bugs reported on this underlying behavior in the polymer-cli & app-drawer-template repos |
sorvell
pushed a commit
that referenced
this issue
Jun 23, 2016
Ensure custom styles updated after adding custom-style async. Fixes #3705.
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Lazy-loaded
<style is="custom-style">
should trigger global updateStyles. If you currently async load an import that contains a top-levelcustom-style
(or more likely, an element that depends on acustom-style
, such aspaper-card
), although thecustom-style
gets registered and the globalPolymer.StyleDefaults
properties get updated, they do not cascade down the tree.Live Demo
Works (paper-card loaded sync): http://jsbin.com/raboji/edit?html,output
Fails (paper-card loaded on demand): http://jsbin.com/ruhuqo/edit?html,output
Steps to Reproduce
See failing example above. Note, it's important to have a host element that consumes custom properties between the lazy-loaded element consuming lazy-loaded styles and the root, otherwise the custom property styles are chained lazily back up to the root and it will work.
Expected Results
Styles applied by global
<style is="custom-style">
should apply after being lazy-loaded.Actual Results
Styles applied by global
<style is="custom-style">
do not apply after being lazy-loaded.Browsers Affected
Versions
The text was updated successfully, but these errors were encountered: