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.

Icon Buttons in Toolbar do not vertically center align.

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Button with icons should seem to be vertically center aligned in toolbar. A button with just text works as expected.

What is the current behavior?

Icon buttons don’t work as expected. The icons seem to align to the top of the toolbar. This is best explained in the screenshot below.

What are the steps to reproduce?

Here’s my code

<md-toolbar class="toolbar">
  <span class="toolbar-title">Awesome</span>
  <button md-button><md-icon style="color:white">home</md-icon></button>
  <button md-button style="color:white">ABOUT</button>
</md-toolbar>

Providing a Plunker (or similar) is the best way to get the team to see your issue. http://plnkr.co/edit/W5RnGGRszmCBwv2JYYc9?p=preview

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

I am on Angular 2 RC 2. Material 2.0.0-alpha.5-2 OS - ubuntu 16.04 Browser : Chrome - 51.0.2704.103, Firefox - 47.

Is there anything else we should know?

image

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
TrevorBroderick1commented, Aug 17, 2016

What about a situation where you want to have text and an icon in the button?

<button md-button>
    <span>Log Out</span>
    <md-icon class="md-24">lock</md-icon>
</button>

This does not vertically align the icon with the text, and md-icon-button isn’t right for this situation.

2reactions
praveenpugliacommented, Aug 18, 2016

I didn’t find anything yet that addresses a situation like this. image

Each of those could well be buttons we may require at different places.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Icon Buttons in Toolbar do not vertically center align. #756
Button with icons should seem to be vertically center aligned in toolbar. A button with just text works as expected.
Read more >
Align material icon vertically - Stack Overflow
Save this question. Show activity on this post. I am trying to vertically align my "dropdown arrow" in a naviation menu.
Read more >
Toolbars - RAD Studio - Embarcadero DocWiki
Toolbar intended to contain actions that do not fit other toolbars. ... Align vertical centers, Updates the top edge of every selected control...
Read more >
Align text or adjust the margins within a text box
Align text vertically · Click the outer edge of the text box to select it. · On the Shape Format tab, click Format...
Read more >
ion-toolbar
Ion-toolbar component lets you customize toolbar buttons on your app menu. Add fixed toolbars above or below content or use full screen to...
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