Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(menu): text alignment in md-button with icon and href
Browse files Browse the repository at this point in the history
- only `a` element had `display: flex;` but when `ng-click` was present an `a` element is not available therefore there's no flex container, moving the `display: flex;` to the button solves it

fixes #7367

Closes #7401
  • Loading branch information
EladBezalel authored and ThomasBurleson committed Mar 5, 2016
1 parent 8d7f54f commit 34f2704
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/menu/demoMenuPositionModes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h3 class="md-subhead">Target-Based Position Modes</h3>
<md-menu-content width="4" >
<md-menu-item ng-repeat="item in [1, 2, 3]">
<md-button ng-click="ctrl.announceClick($index)">
<div layout="row">
<div layout="row" flex>
<p flex>Option {{item}}</p>
<md-icon md-menu-align-target md-svg-icon="call:portable-wifi-off" style="margin: auto 3px auto 0;"></md-icon>
</div>
Expand Down
9 changes: 2 additions & 7 deletions src/components/menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,17 @@ md-menu-item {
padding-right: 2*$baseline-grid;
}

> a.md-button {
display: flex;
}

> .md-button {
border-radius: 0;
margin: auto 0;
font-size: (2*$baseline-grid) - 1;
text-transform: none;
font-weight: 400;
text-align: left;
text-align: start;
height: 100%;
padding-left: 2*$baseline-grid;
padding-right: 2*$baseline-grid;
display: inline-block;
@include rtl(text-align, left, right);
display: flex;
align-items: baseline;
align-content: flex-start;
width:100%;
Expand Down

0 comments on commit 34f2704

Please sign in to comment.