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 // iOS Menu
// -------------------------------------------------- // --------------------------------------------------
.menu-inner {
background: $menu-ios-background;
}
:host(.menu-type-overlay) .menu-inner { :host(.menu-type-overlay) .menu-inner {
box-shadow: $menu-ios-box-shadow-overlay; box-shadow: $menu-ios-box-shadow-overlay;
} }

View File

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

View File

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

View File

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

View File

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