From 833a017dd0de597712ee59dca11f499d024e7cce Mon Sep 17 00:00:00 2001 From: Andy Joslin Date: Tue, 1 Apr 2014 14:20:04 -0600 Subject: [PATCH] revert(scss): more explicit, repetitive, and reliable system for statusbar Addresses #1012 --- scss/_platform.scss | 32 +++++++++++++++++++++++++------- scss/_scaffolding.scss | 1 + scss/_tabs.scss | 1 + test/html/status-bar.html | 1 - 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/scss/_platform.scss b/scss/_platform.scss index 70e13ac20c..0a5d1ac6a5 100644 --- a/scss/_platform.scss +++ b/scss/_platform.scss @@ -10,19 +10,37 @@ // Bump down everything to make room for it. However, if // if its in Cordova, and set to fullscreen, then disregard the bump. &:not(.fullscreen) { - margin-top: 20px; - /* - * Make header bar go under the status bar - */ .bar-header:not(.bar-subheader) { - top: -$ios7-statusbar-height; height: $bar-height + $ios7-statusbar-height; + + &.item-input-inset .item-input-wrapper { + margin-top: 19px !important; + } + > * { - margin-top: $ios7-statusbar-height; + margin-top: 20px; } } + .tabs-top > .tabs, + .tabs.tabs-top { + top: $bar-height + $ios7-statusbar-height; + } + + .has-header, + .bar-subheader { + top: $bar-height + $ios7-statusbar-height; + } + .has-subheader { + top: (2 * $bar-height) + $ios7-statusbar-height; + } + .has-tabs-top { + top: $bar-height + $tabs-height + $ios7-statusbar-height; + } + .has-header.has-subheader.has-tabs-top { + top: 2 * $bar-height + $tabs-height + $ios7-statusbar-height; + } } - &.status-bar-hide { + &.statusbar-hide { // Cordova doesn't adjust the body height correctly, this makes up for it margin-bottom: 20px; } diff --git a/scss/_scaffolding.scss b/scss/_scaffolding.scss index d487ab953f..7b9cac2db8 100644 --- a/scss/_scaffolding.scss +++ b/scss/_scaffolding.scss @@ -282,6 +282,7 @@ ion-infinite-scroll.active .scroll-infinite { // Pad top/bottom of content so it doesn't hide behind .bar-title and .bar-tab. // Note: For these to work, content must come after both bars in the markup +/* If you change these, change platform.scss as well */ .has-header { top: $bar-height; } diff --git a/scss/_tabs.scss b/scss/_tabs.scss index 33ba0bcb11..ffa22f039c 100644 --- a/scss/_tabs.scss +++ b/scss/_tabs.scss @@ -90,6 +90,7 @@ } /* Allow parent element to have tabs-top */ +/* If you change this, change platform.scss as well */ .tabs-top > .tabs, .tabs.tabs-top { top: $bar-height; diff --git a/test/html/status-bar.html b/test/html/status-bar.html index 53e5fe9d9f..e3f9327987 100644 --- a/test/html/status-bar.html +++ b/test/html/status-bar.html @@ -9,7 +9,6 @@ position: absolute; width: 100%; height: 20px; - top: -20px; background: blue; color: white; text-align: center;