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

Commit 34f2704

Browse files
EladBezalelThomasBurleson
authored andcommitted
fix(menu): text alignment in md-button with icon and href
- 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
1 parent 8d7f54f commit 34f2704

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/components/menu/demoMenuPositionModes/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ <h3 class="md-subhead">Target-Based Position Modes</h3>
4545
<md-menu-content width="4" >
4646
<md-menu-item ng-repeat="item in [1, 2, 3]">
4747
<md-button ng-click="ctrl.announceClick($index)">
48-
<div layout="row">
48+
<div layout="row" flex>
4949
<p flex>Option {{item}}</p>
5050
<md-icon md-menu-align-target md-svg-icon="call:portable-wifi-off" style="margin: auto 3px auto 0;"></md-icon>
5151
</div>

src/components/menu/menu.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,17 @@ md-menu-item {
8181
padding-right: 2*$baseline-grid;
8282
}
8383

84-
> a.md-button {
85-
display: flex;
86-
}
87-
8884
> .md-button {
8985
border-radius: 0;
9086
margin: auto 0;
9187
font-size: (2*$baseline-grid) - 1;
9288
text-transform: none;
9389
font-weight: 400;
94-
text-align: left;
95-
text-align: start;
9690
height: 100%;
9791
padding-left: 2*$baseline-grid;
9892
padding-right: 2*$baseline-grid;
99-
display: inline-block;
93+
@include rtl(text-align, left, right);
94+
display: flex;
10095
align-items: baseline;
10196
align-content: flex-start;
10297
width:100%;

0 commit comments

Comments
 (0)