paper-icon-button icon indicating copy to clipboard operation
paper-icon-button copied to clipboard

Icon shrinks in flex parent

Open robrez opened this issue 9 years ago • 2 comments

When placed inside a horizontal-flex parent, the iron-icon shrinks w/ the content window.

Here is a codepen

paper-icon-button

A couple workarounds:

  • (A) Wrap icon-buttons in a div
  • (B) Explicit size on paper-icon-button

Issue #22 seems similar, except the focus was on getting paper-icon-button/its icon to be larger. This issue recommended usage of explicit sizing of the paper-icon-button... maybe workaround (B) is the recommended fix?

Potential patch?

      iron-icon {
        --iron-icon-width: 100%;
        --iron-icon-height: 100%;
+       min-width: var(--iron-icon-width, 24px);
+       min-height: var(--iron-icon-height, 24px);
      }

robrez avatar Feb 29 '16 15:02 robrez

I've noticed this happening with my own application, and also (probably of more concern to Google engineers) to Google Play Music's playlist button.

screenshot 6

Ortham avatar Mar 19 '16 13:03 Ortham

+1

Sinjins avatar Dec 13 '16 00:12 Sinjins