-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-icon (webfont) not correctly aligned in md-button #2597
Comments
By default, Angular Material has: .md-button.md-fab {
width : 5.6rem;
height: 5.6rem;
}
md-icon {
width : 24px;
height: 24px;
} Your .wi {
font-size: 2.5rem;
display:inline-block;
} These changes will solve your issues.: .wi {
font-size: 2.8rem;
display: block;
}
md-icon {
width : 2.8rem;
height: 2.8rem;
} |
@marcysutton - Should we change .md-button.md-fab {
width : 5.6rem;
height: 5.6rem;
}
md-icon {
width : 2.8rem;
height: 2.8rem;
&.[md-font-icon] {
display : block;
}
} Also should the |
Those weather icons come with their own styles that conflict with mdButton. Without using |
I agree, md-icon should use rem. I'll try to prep a plunkr soon (right now it's giving me 504's).
It's the top:5px when you have no label and padding: 0. Using the material icons svg.
|
@ThomasBurleson See if you can reproduce, I'll try to get a plunkr if you can't repro using that. |
@robertbaker - Here is the CodePen md-input-container>md-icon {
position: absolute;
top: 5px;
left: 2px;
} Since this icon is absolutely positioned, you will have to adjust to your own needs with CSS adjustments. |
@ThomasBurleson Although I get top: 5px, not 2px, even in your codepen. 2px it looks fine, but not getting that. Unless you mean that I should adjust it to 2px myself. In that case it's better to use padding:2px instead of 0, then the 5px is fine. |
@robertbaker - yes. I meant that you should adjust yourself on each need-by-need basis. |
Please note that Angular Material no longer uses |
Hmm, this seems to work for me: Written in stylus:
|
Fix from @pencilcheck worked for me. |
Thanks @pencilcheck Thoughts? |
I had a similar problem yesterday, setting the line-height for the material-icons to be inherited fixed it for me. |
This particullary happens in md-fab-speed-dial so I made my fix like this: md-fab-speed-dial
md-icon.material-icons
line-height: $button-fab-line-height !important
|
Hi,
the md-icon isn't correctly aligned in the various md-button.
Example : http://codepen.io/jgx/pen/qdEQYK
Maybe I'm missing extra CSS rules ? But I assumes there should be a default size which works.
The text was updated successfully, but these errors were encountered: