iron-icon icon indicating copy to clipboard operation
iron-icon copied to clipboard

Reflect icon property to attribute

Open mgiuffrida opened this issue 8 years ago • 2 comments

It's nice to style iron-icons based on which icon they show:

iron-icon[icon='done'] {
  --iron-icon-fill-color: var(--google-green-500);
}

However, if the icon property is changed dynamically, the new style rules won't apply (even after updateStyles) because the attribute hasn't changed.

mgiuffrida avatar May 18 '16 23:05 mgiuffrida

/cc @azakus @kevinpschaaf

Would this have performance implications? iron-icon tends to be a high-frequency element, but the icon rarely changes, so it would mostly be an issue at startup.

mgiuffrida avatar May 18 '16 23:05 mgiuffrida

rebased

mgiuffrida avatar Oct 11 '17 05:10 mgiuffrida