Skip to content

Commit 7c5f976

Browse files
annieywwagnermaciel
authored andcommitted
fix(material/menu): prevent mat-menu from affecting flex layout (#21246)
1 parent b9a990a commit 7c5f976

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/material-experimental/mdc-menu/menu.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
@include mdc-menu-surface-core-styles($query: structure);
1111

12+
// Prevent rendering mat-menu as it can affect the flex layout.
13+
mat-menu {
14+
display: none;
15+
}
16+
1217
.mat-mdc-menu-content {
1318
// Note that we include this private mixin, because the public
1419
// one adds a bunch of styles that we aren't using for the menu.

src/material/menu/menu.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ $mat-menu-vertical-padding: 8px !default;
77
$mat-menu-border-radius: 4px !default;
88
$mat-menu-submenu-indicator-size: 10px !default;
99

10+
// Prevent rendering mat-menu as it can affect the flex layout.
11+
mat-menu {
12+
display: none;
13+
}
14+
1015
.mat-menu-panel {
1116
@include mat-menu-base();
1217
max-height: calc(100vh - #{$mat-menu-item-height});

0 commit comments

Comments
 (0)