question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

md-icon is not rendered correctly in md-button

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The Icon in md-icon should be aligned horizontally centered when it is used in a md-raised-button.

What is the current behavior?

When I have a md-icon in a md-raised-button the icon is rendered at the top of the button and not in the center like the normal text is.

What are the steps to reproduce?

<button md-raised-button">Last<md-icon>navigate_before</md-icon></button>

image

Like you can see the icon is rendered very weird.

Which versions of Angular, Material, OS, browsers are affected?

Angular: 2.0.1 Angular Material: 2.0.0-alpha.9-3 Angular-CLI: 1.0.0-beta.15

Tested in Chrome and Firefox on Ubuntu 16.04

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
emilio-martinezcommented, Oct 14, 2016

@denislamela exactly. Vertical align does the trick. That said, some icons shift a bit, so vertical-align: middle will not necessarily work exactly right all the time.

1reaction
denislamelacommented, Oct 14, 2016

I have the same problem with version “v2.0.0-alpha.8-2”. Could you put an example of your workaround @emilio-martinez? Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Material icons not working - Stack Overflow
Faced the issue when icon was not rendering and instead Close text was displaying. Appended the above import in my scss file and...
Read more >
Icon not rendering with the Button Component #1100 - GitHub
Trying to use the Button component with an Icon. What you expected to happen. The Button component should have a vector icon along...
Read more >
5603 (Button with icon not displayed correctly in Firefox when ...
Button with icon not displayed correctly in Firefox when button has css height. ... I'm applying the jQuery UI button widget to, with...
Read more >
Custom button icon (Image Fit - Fill) rendering is...
Hello. Ever since we updated our power bi desktop, we are seeing permananet rendering issues in the custom button icon when using the...
Read more >
Icon Button - Kendo UI for jQuery - Documentation
Get started with the jQuery Button by Kendo UI and add background, image, ... In some cases, you may want to use a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found