iron-icon
iron-icon copied to clipboard
Reflect icon property to attribute
It's nice to style iron-icon
s 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.
/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.
rebased