fix(menu): ios styles

This commit is contained in:
Manu Mtz.-Almeida
2018-09-01 18:07:17 +02:00
parent e7416435d8
commit 281f9a307f
5 changed files with 9 additions and 11 deletions

View File

@ -4,10 +4,6 @@
// iOS Menu
// --------------------------------------------------
.menu-inner {
background: $menu-ios-background;
}
:host(.menu-type-overlay) .menu-inner {
box-shadow: $menu-ios-box-shadow-overlay;
}

View File

@ -4,10 +4,6 @@
// Material Design Menu
// --------------------------------------------------
.menu-inner {
background: $menu-md-background;
}
:host(.menu-type-overlay) .menu-inner {
box-shadow: $menu-md-box-shadow;
}

View File

@ -6,6 +6,7 @@
:host {
--width: #{$menu-width};
--width-small: #{$menu-small-width};
--background: #{$background-color};
@include position(0, 0, 0, 0);
@ -33,6 +34,8 @@
width: var(--width);
height: 100%;
background: var(--background);
contain: strict;
}

View File

@ -60,8 +60,10 @@ export class Menu implements MenuI {
@Watch('type')
typeChanged(type: string, oldType: string | undefined) {
const contentEl = this.contentEl;
if (contentEl && oldType) {
contentEl.classList.remove(`menu-content-${oldType}`);
if (contentEl) {
if (oldType) {
contentEl.classList.remove(`menu-content-${oldType}`);
}
contentEl.classList.add(`menu-content-${type}`);
contentEl.removeAttribute('style');
}

View File

@ -251,7 +251,8 @@ export class Picker implements OverlayInterface {
return [
<ion-backdrop
visible={this.showBackdrop}
tappable={this.backdropDismiss}>
tappable={this.backdropDismiss}
>
</ion-backdrop>,
<div class="picker-wrapper" role="dialog">