Skip to content

Commit b23cecd

Browse files
crisbetojosephperrott
authored andcommitted
fix(menu): collapse empty menu panel (#12211)
1 parent 49ec9ca commit b23cecd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/menu/menu.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ $mat-menu-submenu-indicator-size: 10px !default;
1919
}
2020
}
2121

22-
.mat-menu-content {
22+
// `:not(:empty)` allows for the menu to collapse to 0x0 when it doesn't have content.
23+
.mat-menu-content:not(:empty) {
2324
padding-top: $mat-menu-vertical-padding;
2425
padding-bottom: $mat-menu-vertical-padding;
2526
}

0 commit comments

Comments
 (0)