diff --git a/scss/_bar.scss b/scss/_bar.scss index 132602a2ad..29953f5d7c 100644 --- a/scss/_bar.scss +++ b/scss/_bar.scss @@ -334,6 +334,8 @@ border-bottom-width: 0; background-position: top; + height: $bar-footer-height; + &.item-input-inset { position: absolute; } @@ -347,10 +349,14 @@ .bar-subheader { top: $bar-height; display: block; + + height: $bar-subheader-height; } .bar-subfooter { - bottom: $bar-height; + bottom: $bar-footer-height; display: block; + + height: $bar-subfooter-height; } .nav-bar-block { @@ -366,4 +372,3 @@ .bar .buttons .hide { display: none; } - diff --git a/scss/_modal.scss b/scss/_modal.scss index 3e701c9592..0b56bb5e61 100644 --- a/scss/_modal.scss +++ b/scss/_modal.scss @@ -65,13 +65,13 @@ top: $bar-height; } .has-subheader { - top: (2 * $bar-height); + top: $bar-height + $bar-subheader-height; } .has-tabs-top { top: $bar-height + $tabs-height; } .has-header.has-subheader.has-tabs-top { - top: 2 * $bar-height + $tabs-height; + top: $bar-height + $bar-subheader-height + $tabs-height; } } } diff --git a/scss/_platform.scss b/scss/_platform.scss index 0f26c54d4c..f9aaa2390a 100644 --- a/scss/_platform.scss +++ b/scss/_platform.scss @@ -31,13 +31,13 @@ top: $bar-height + $ios-statusbar-height; } .has-subheader { - top: (2 * $bar-height) + $ios-statusbar-height; + top: $bar-height + $bar-subheader-height + $ios-statusbar-height; } .has-tabs-top { top: $bar-height + $tabs-height + $ios-statusbar-height; } .has-header.has-subheader.has-tabs-top { - top: 2 * $bar-height + $tabs-height + $ios-statusbar-height; + top: $bar-height + $bar-subheader-height + $tabs-height + $ios-statusbar-height; } } &.status-bar-hide { @@ -57,4 +57,3 @@ -webkit-transition: none !important; transition: none !important; } - diff --git a/scss/_scaffolding.scss b/scss/_scaffolding.scss index e50e5b0bfa..8ecdf1f294 100644 --- a/scss/_scaffolding.scss +++ b/scss/_scaffolding.scss @@ -311,20 +311,20 @@ ion-infinite-scroll { } .has-subheader { - top: $bar-height * 2; + top: $bar-height + $bar-subheader-height; } .has-tabs-top { top: $bar-height + $tabs-height; } .has-header.has-subheader.has-tabs-top { - top: 2 * $bar-height + $tabs-height; + top: $bar-height + $bar-subheader-height + $tabs-height; } .has-footer { - bottom: $bar-height; + bottom: $bar-footer-height; } .has-subfooter { - bottom: $bar-height * 2; + bottom: $bar-footer-height + $bar-subfooter-height; } .has-tabs, @@ -333,7 +333,7 @@ ion-infinite-scroll { } .has-footer.has-tabs { - bottom: $tabs-height + $bar-height; + bottom: $tabs-height + $bar-footer-height; } // A full screen section with a solid background diff --git a/scss/_variables.scss b/scss/_variables.scss index 3339e79e7a..078636f228 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -162,6 +162,10 @@ $bar-padding-portrait: 5px !default; $bar-padding-landscape: 5px !default; $bar-transparency: 1 !default; +$bar-footer-height: 44px !default; +$bar-subheader-height: 44px !default; +$bar-subfooter-height: 44px !default; + $bar-light-bg: rgba($button-light-bg, $bar-transparency) !default; $bar-light-text: $button-light-text !default; $bar-light-border: $button-light-border !default; diff --git a/test/css/subfooters.html b/test/css/subfooters.html new file mode 100644 index 0000000000..820e8da3d3 --- /dev/null +++ b/test/css/subfooters.html @@ -0,0 +1,88 @@ + + + + + + Footers + + + + + +
+

Sub Footer Test

+
+ + +

Footer and subfooter should always stay at the bottom of the screen, and on top of the main content.

+

Content element must have "has-footer" and "has-subfooter" as a classname.

+

+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+

+
+ +
+

Subfooter

+
+ + + + + diff --git a/test/css/subheaders.html b/test/css/subheaders.html new file mode 100644 index 0000000000..6724c05bc2 --- /dev/null +++ b/test/css/subheaders.html @@ -0,0 +1,88 @@ + + + + + + Header + + + + + + +
+

Header title

+
+ +
+

Subheader title

+
+ + +

Content element must have "has-header" "has-subheader" as a classname.

+

+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+ Content
+

+
+ +