-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-icon inconsistant #7599
Comments
Can you please provide a simple Codepen so we can debug the issue further? |
I found this issue when md-icon is a child of flexbox parent (display: flex) and hasn't enough space and md-icon doesn't hold min-width, icon and ripple is displayed wrong. Ad-hoc fix is add to the md-button-icon min-width value. |
Here is the demo - http://codepen.io/manish2535/pen/VaPWBw The last icon is using warning whereas the others are not. I think its happening because when you use
here instead of 100% in the height and width it needs 24. If you look at the SVG files themselves they all use height="24" width="24" which is why |
@manish2535 @topherfangio I'm a bit unsure how the actual behavior should be. If we apply a min-width/height property, then we'll break the flexbox support for Maybe you have some thoughts, let me know.. |
@devversion I think the issue is that the How will it break flexbox support if we set the min-width/height like the other ones? |
@topherfangio With breaking flexbox support I mean, that these icons aren't responsive anymore. So if you have multiple icons in a row, and the viewport becomes too small, then an overflow will appear. And in my opinion, that's taking the advantages of flexbox. Really hard decision I think 😄 |
@devversion I'm a bit confused. How does setting the width/height of these icons affect the layout of their container? |
* Icons should not shrink on smaller viewport. (At both axis, looks weird and is inconsistent) * Also fixes an issue in the toolbar demo, where the icons shrink, when the viewport is to small. Fixes angular#7599
References #7558 |
* Icons should not shrink on smaller viewport. (At both axis, looks weird and is inconsistent) * Also fixes an issue in the toolbar demo, where the icons shrink, when the viewport is to small. Fixes angular#7599 Closes angular#7860
Using
<md-icon>cancel</md-icon>
and<md-icon md-svg-src="/images/icons/ic_stop_24px.svg"/>
gives a slightly different behavior when the width of the parent is changed.
The circle icon is using the
md-svg-src
which shrinks as the viewport shrinks whereas the icons using<md-icon>blah</md-icon>
hold their minimum width of 24px.The text was updated successfully, but these errors were encountered: