From cdb1f8503c7a3799c776f240163d6cb750126fbb Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 17 Jun 2016 23:21:15 -0500 Subject: [PATCH] chore(sass): move z-index vars to separate file, remove unused vars --- src/components/app/structure.scss | 49 +++---------------------- src/components/app/z-index.scss | 23 ++++++++++++ src/components/modal/test/modal.spec.ts | 2 - src/components/toolbar/toolbar.ios.scss | 1 + 4 files changed, 29 insertions(+), 46 deletions(-) create mode 100644 src/components/app/z-index.scss diff --git a/src/components/app/structure.scss b/src/components/app/structure.scss index a161e4d844..f6c08baf39 100644 --- a/src/components/app/structure.scss +++ b/src/components/app/structure.scss @@ -1,44 +1,5 @@ @import "../../globals.core"; - -// Z-Index -// -------------------------------------------------- -// Grouped by elements which would be siblings - -$z-index-menu-overlay: 80; -$z-index-menu-backdrop: 79; -$z-index-overlay: 1000; -$z-index-click-block: 9999; - -$z-index-fixed-content: 2; -$z-index-scroll-content: 1; -$z-index-refresher: 0; - -$z-index-navbar-section: 10; - -$z-index-page-container: 0; -$z-index-selected-tab: 1; -$z-index-toolbar: 10; -$z-index-toolbar-background: 0; - -$z-index-toolbar-border: 20; -$z-index-list-border: 50; - -$z-index-backdrop: 2; -$z-index-overlay-wrapper: 10; - -$z-index-item-options: 1; - - -// Flex Order -// -------------------------------------------------- - -$flex-order-toolbar-top: -10; -$flex-order-toolbar-bottom: 10; - -$flex-order-tabbar-navbar: -30; -$flex-order-tabbar-top: -20; -$flex-order-tabbar-bottom: 20; - +@import "./z-index"; // App Structure @@ -132,7 +93,7 @@ ion-page { height: 100%; // do not show, but still render so we can get dimensions - visibility: hidden; + opacity: 0; } ion-content { @@ -156,7 +117,7 @@ ion-page scroll-content { ion-page.show-page { // show the page now that it's ready - visibility: visible; + opacity: 1; } ion-page.show-page scroll-content { @@ -208,11 +169,11 @@ ion-tabbar { width: 100%; // default to hidden until ready - visibility: hidden; + opacity: 0; } ion-tabbar.show-tabbar { - visibility: visible; + opacity: 1; } [tabbarPlacement=top] > ion-tabbar { diff --git a/src/components/app/z-index.scss b/src/components/app/z-index.scss new file mode 100644 index 0000000000..2eb5408762 --- /dev/null +++ b/src/components/app/z-index.scss @@ -0,0 +1,23 @@ + +// Z-Index +// -------------------------------------------------- +// Grouped by elements which would be siblings + +$z-index-menu-overlay: 80; +$z-index-menu-backdrop: 79; +$z-index-overlay: 1000; +$z-index-click-block: 9999; + +$z-index-fixed-content: 2; +$z-index-scroll-content: 1; +$z-index-refresher: 0; + +$z-index-page-container: 0; +$z-index-selected-tab: 1; +$z-index-toolbar: 10; +$z-index-toolbar-background: 0; + +$z-index-backdrop: 2; +$z-index-overlay-wrapper: 10; + +$z-index-item-options: 1; diff --git a/src/components/modal/test/modal.spec.ts b/src/components/modal/test/modal.spec.ts index a4f2271e00..963e9518a2 100644 --- a/src/components/modal/test/modal.spec.ts +++ b/src/components/modal/test/modal.spec.ts @@ -8,9 +8,7 @@ export function run() { it('should have the correct properties on modal view controller instance', () => { let modalViewController = Modal.create(ComponentToPresent); - expect(modalViewController.modalViewType).toEqual("ComponentToPresent"); expect(modalViewController.componentType).toEqual(ModalCmp); - expect(modalViewController.viewType).toEqual("modal"); expect(modalViewController.isOverlay).toEqual(true); expect(modalViewController instanceof ViewController).toEqual(true); }); diff --git a/src/components/toolbar/toolbar.ios.scss b/src/components/toolbar/toolbar.ios.scss index c9e5ef8fdc..7395bbd0d0 100644 --- a/src/components/toolbar/toolbar.ios.scss +++ b/src/components/toolbar/toolbar.ios.scss @@ -30,6 +30,7 @@ $toolbar-ios-button-border-radius: 4px !default; $navbar-ios-height: $toolbar-ios-height !default; + .toolbar { padding: $toolbar-ios-padding;