Skip to content

Commit 6f5dcd5

Browse files
crisbetokara
authored andcommitted
fix(menu): make it easier to override elevation (#5873)
Fixes #5870.
1 parent 93b36b3 commit 6f5dcd5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/lib/core/style/_menu-common.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ $mat-menu-side-padding: 16px !default;
1313
$mat-menu-icon-margin: 16px !default;
1414

1515

16-
@mixin mat-menu-base($elevation) {
17-
@include mat-elevation($elevation);
16+
@mixin mat-menu-base($default-elevation) {
1817
min-width: $mat-menu-overlay-min-width;
1918
max-width: $mat-menu-overlay-max-width;
2019

20+
// Allow elevation to be overwritten.
21+
&:not([class*='mat-elevation-z']) {
22+
@include mat-elevation($default-elevation);
23+
}
24+
2125
overflow: auto;
2226
-webkit-overflow-scrolling: touch; // for momentum scroll on mobile
2327
}

0 commit comments

Comments
 (0)