Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Consider special handler for style attribute bindings #166

Open
sorvell opened this issue Apr 17, 2014 · 1 comment
Open

Consider special handler for style attribute bindings #166

sorvell opened this issue Apr 17, 2014 · 1 comment

Comments

@sorvell
Copy link
Contributor

sorvell commented Apr 17, 2014

When a binding in the style attribute causes the attribute to be re-written, any settings to style properties are lost. Perhaps this could be fixed by having style bindings directly update style properties rather than the attribute.

Here's an example, note that the box unexpectedly jumps up when the background data changes:

http://jsbin.com/matef/3/edit

@frankiefu
Copy link

In paper-progress we do style attribute binding to change the width:

<div id="activeProgress" style="width: {{ratio}}%;"></div>

An user wants to change the style of paper-progress from javascript:

this.$.prog.querySelector("::shadow #activeProgress").style.backgroundColor = 'red';

This will not work because binding in the style attribute causes the attribute to be re-written. I can workaround this in paper-progress but I just want to make a note here.

frankiefu added a commit to googlearchive/paper-progress that referenced this issue Oct 13, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants