Skip to content

Commit eab0865

Browse files
authored
fix(menu): menus show proper drop shadows (ionic-team#19454)
fixes ionic-team#19387
1 parent c79e74b commit eab0865

File tree

3 files changed

+41
-37
lines changed

3 files changed

+41
-37
lines changed

core/src/components/menu-controller/menu-controller.scss

Lines changed: 0 additions & 35 deletions
This file was deleted.

core/src/components/menu-controller/menu-controller.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { AnimationBuilder, IonicAnimation, MenuI } from '../../interface';
44
import { menuController } from '../../utils/menu-controller';
55

66
@Component({
7-
tag: 'ion-menu-controller',
8-
styleUrl: 'menu-controller.scss'
7+
tag: 'ion-menu-controller'
98
})
109
export class MenuController {
1110

core/src/css/core.scss

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@import "../themes/ionic.skip-warns.scss";
22
@import "../themes/ionic.globals";
3+
@import "../components/menu/menu.ios.vars";
4+
@import "../components/menu/menu.md.vars";
35

46
// Ionic Font Family
57
// --------------------------------------------------
@@ -128,3 +130,41 @@ html.plt-ios.plt-hybrid, html.plt-ios.plt-pwa {
128130
--ion-safe-area-right: env(safe-area-inset-right);
129131
}
130132
}
133+
134+
// Menu Styles
135+
// TODO: Find a better long term solution for this
136+
// --------------------------------------------------
137+
138+
.menu-content {
139+
@include transform(translate3d(0, 0, 0));
140+
}
141+
142+
.menu-content-open {
143+
cursor: pointer;
144+
touch-action: manipulation;
145+
146+
// the containing element itself should be clickable but
147+
// everything inside of it should not clickable when menu is open
148+
pointer-events: none;
149+
}
150+
151+
.ios .menu-content-reveal {
152+
box-shadow: $menu-ios-box-shadow-reveal;
153+
}
154+
155+
[dir=rtl].ios .menu-content-reveal {
156+
box-shadow: $menu-ios-box-shadow-reveal-rtl;
157+
}
158+
159+
.ios .menu-content-push {
160+
box-shadow: $menu-ios-box-shadow-push;
161+
}
162+
163+
.md .menu-content-reveal {
164+
box-shadow: $menu-md-box-shadow;
165+
}
166+
167+
.md .menu-content-push {
168+
box-shadow: $menu-md-box-shadow;
169+
}
170+

0 commit comments

Comments
 (0)