googlearchive / core-icon

A custom element that display an icon.
https://www.polymer-project.org/docs/elements/core-elements.html#core-icon
10 stars 17 forks source link

Have the icon.size default to computed font size. #6

Closed arodic closed 10 years ago

arodic commented 10 years ago

This is a proposal to have the icon size default to computed font size. Very often, icons are presented next to text of matching size. This would make it possible to set the font size with CSS and have the icon automatically resize. Does this sound useful?

ebidel commented 10 years ago

Before this PR can be merged, please sign the CLA. See the CONTRIBUTING guide.

ebidel commented 10 years ago

Thanks for signing the CLA!

sorvell commented 10 years ago

core-icon can now be sized via css. It should be relatively easy to make it size itself based on font-size by simply using em's for width/height.

<style>
  .font-sized {
    width: 1.5em;
    height: 1.5em;
  }
</style>
<core-icon class="font-sized" icon="menu"></core-icon>

Given that this functionality can be achieved without this PR, I'm going to close this. Please file an issue if there's any additional problem. Thanks.