I am working on my side menu, I managed to put a “backdrop” effect (like in modals) on the main content when I open my side menu, but I can’t find a way to add a shadow that goes at the right of my left side menu on top of the main content.
The only solutions I found online are like this one:
Bringing a shadow at the left of the main content toward the sidemenu, making it look like the main content is on top of the sidemenu.
I placed the box-shadow property in the ion-side-menu element and it worked, don’t forget to also include a z-index bigger than the one in ion-side-menu-content.
However, be careful with the z-index property, because it can only be bigger when the menu is open, otherwise it will always be visible.
So, concluding, add the box-shadow in the ion-side-menu element and include a big z-index when the menu is opened.
However, this kills the animation of the sliding side menu to open.
Because after about 100ms, when the body takes the class menu-open, the side-menu suddenly jumps with a z-index that makes it on top of the whole content. It’s all sudden, killing the animation.
Do you have the same problem? How did you implement it smoothly?
Yeah I noticed the same problem.
I opted for using in the equivalent to your class .shadowMenu
transition:all 10s;
-moz-transition: all 10s;
-webkit-transition: all 10s;
This way you can adjust the seconds to make it more or less smooth as you want. There are other ways to make animations (javascript, jquery,…) but for me this was the easiest.