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

Size cannot be set using CSS when using sprite iron-iconset

Open deceze opened this issue 9 years ago • 0 comments

Having defined an iron-iconset:

<iron-iconset name="foo"
              src="sprite.png"
              size="256"
              width="2048"
              icons="bar baz">
</iron-iconset>

And using it like this:

<iron-icon icon="foo:bar"></iron-icon>

It seems impossible to set the icon's size using e.g.:

<style is="custom-style">
    iron-icon {
        --iron-icon-height: 90px;
        --iron-icon-width: 90px;
    }
</style>

The size of the sprite is applied to the icon in _addIconStyles of iron-iconset, and iron-icon does not override it.

deceze avatar Oct 26 '15 14:10 deceze