Binding style attributes to component properties in polymer-1.0


Given the following .html


<!-- shared-styles.html -->
<dom-module id="shared-styles">
      .red { color: red; }

and the .dart src


String redColor = ...

How can I bind the redColor property to the color attribute in the element of the .html declaration?



This is not supported.

I would use the Polymer API to change CSS variables like shown in polymer 1.0 – how to change font size programmatically? as work-around.

Answered By – Günter Zöchbauer

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.