-
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
CustomStyle change has no effect #1851
Comments
Yes, that's a bug and it should work. Thanks for finding the issue. Calling |
I get this error when I call Polymer.updateStyles() |
|
Use this.async(function(){
this.customStyle['--theme-color'] = this.themecolor;
(this.domHost || Polymer).updateStyles();
}); |
@binggg I figured it out last night, I was calling the function that ran "Polymer.updateStyles()" in my ready function. Once I took it out it worked fine. I didn't need it in my ready anyways, it was just there for testing, but I'm pretty sure your async fix would have worked if I had needed it in my ready function still. Thanks! |
…t changes to customStyle are recognized. Fixes #1915: Include a `customStyleProperties` argument to `updateStyles` for convenience.
In what part of the startup pipeline will updateStyles work. http://jsfiddle.net/ghstahl/6w8sajnt/8/ I have a jsFiddle where I set my paper-button class via a compute and that happens before ready. However the styling doesn't take until I call updateStyles after ready(); The expected behavior I want is that my button shadow is red because I have set the is-hot style before ready is called. |
Custom styles are applied when an element is |
Looking at https://www.polymer-project.org/1.0/docs/devguide/styling.html#style-api I thought that this example should work:
http://jsbin.com/ciyomuruha/1/edit?html,output
In the example I expected that the background turns blue after clicking on that button.
The text was updated successfully, but these errors were encountered: