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

Reflect `icon` to attribute for styling

Open n1ywb opened this issue 8 years ago • 0 comments

It would be great if the icon property were reflected to an attribute, then we could style icons using an attribute selector.

E.g.

<style>iron-icon[icon="my-icon"] { color: green; }</style>
<iron-icon icon="my-icon"></iron-icon>

This would allow you to define colors for all your icons in a style module and apply them without having to add an id or class to the iron-icon.

Alternatively iron-icon could add my-icon as a class.

Looks like this feature has been PRed before https://github.com/PolymerElements/iron-icon/pull/69

n1ywb avatar Jul 19 '17 17:07 n1ywb