Skip to content

Commit b9a256c

Browse files
committed
refactor(menu): use left/right instead
1 parent 0a62604 commit b9a256c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

core/src/components/menu/menu.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@
3737

3838

3939
.menu-inner {
40-
@include transform(translateX(-9999px));
41-
42-
will-change: transform;
43-
4440
display: flex;
4541
position: absolute;
42+
right: unset;
43+
/* stylelint-disable property-disallowed-list */
44+
left: -100%; /* Hide offscreen for left-sided menu */
4645

4746
flex-direction: column;
4847
justify-content: space-between;
@@ -55,6 +54,8 @@
5554
min-height: var(--min-height);
5655
max-height: var(--max-height);
5756

57+
transform: none; /* Avoid using transform */
58+
5859
background: var(--background);
5960

6061
contain: strict;

core/src/utils/menu-controller/animations/overlay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const menuOverlayAnimation = (menu: MenuI): Animation => {
2727
openedX = '0px';
2828
}
2929

30-
menuAnimation.addElement(menu.menuInnerEl!).fromTo('transform', `translateX(${closedX})`, `translateX(${openedX})`);
30+
menuAnimation.addElement(menu.menuInnerEl!).fromTo('left', `${closedX}`, `${openedX}`);
3131

3232
const mode = getIonMode(menu);
3333
const isIos = mode === 'ios';

0 commit comments

Comments
 (0)