perf(app): move app css to global css

This commit is contained in:
Manu Mtz.-Almeida
2018-08-08 12:07:57 +02:00
parent f9732aa013
commit a71f382795
5 changed files with 61 additions and 55 deletions

View File

@ -1,5 +1,3 @@
@import "../../themes/ionic.globals";
@import "../../themes/ionic.mixins";
ion-app.is-device {
user-select: none;
@ -20,53 +18,3 @@ ion-app.statusbar-padding {
--ion-statusbar-padding: env(safe-area-inset-top);
}
}
// Page Container Structure
// --------------------------------------------------
ion-app,
ion-router-outlet,
ion-tab,
ion-tabs,
ion-nav,
.ion-page {
@include position(0, 0, 0, 0);
position: absolute;
contain: layout size style;
overflow: hidden;
z-index: $z-index-page-container;
}
ion-app,
.ion-page {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.ion-page-invisible {
opacity: 0;
}
// Misc
// --------------------------------------------------
ion-route,
ion-route-redirect,
ion-router,
ion-animation-controller,
ion-nav-controller,
ion-menu-controller,
ion-action-sheet-controller,
ion-alert-controller,
ion-loading-controller,
ion-modal-controller,
ion-picker-controller,
ion-toast-controller,
.ion-page-hidden {
/* stylelint-disable-next-line declaration-no-important */
display: none;
}

View File

@ -22,9 +22,11 @@ export class App {
}
componentDidLoad() {
importTapClick(this.win);
importInputShims(this.win, this.config);
importStatusTap(this.win, this.isDevice, this.queue);
setTimeout(() => {
importTapClick(this.win);
importInputShims(this.win, this.config);
importStatusTap(this.win, this.isDevice, this.queue);
}, 32);
}
hostData() {
@ -34,6 +36,7 @@ export class App {
return {
class: {
'ion-page': true,
'is-device': this.isDevice,
'is-hydrid': hybrid,
'is-standalone': isStandalone,

View File

@ -1,5 +1,15 @@
@import "../../themes/ionic.globals";
:host {
@include position(0, 0, 0, 0);
position: absolute;
contain: layout size style;
overflow: hidden;
z-index: $z-index-page-container;
}
.nav-decor {
display: none;
}

View File

@ -1,5 +1,15 @@
@import "../../themes/ionic.globals";
:host {
@include position(0, 0, 0, 0);
position: absolute;
contain: layout size style;
overflow: hidden;
z-index: $z-index-page-container;
}
.nav-decor {
display: none;
}