Skip to content

Commit

Permalink
fix(cordova): fix the status bar padding with the new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Jun 17, 2016
1 parent 5a85d82 commit 15642e4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 45 deletions.
8 changes: 3 additions & 5 deletions src/platform/cordova.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@
$cordova-ios-statusbar-padding-modal-max-width: $cordova-statusbar-padding-modal-max-width !default;


@include navbar-section-statusbar-padding($toolbar-ios-height);
@include navbar-section-title-statusbar-padding($toolbar-ios-height);

.tab-subpage,
ion-nav > ion-page,
ion-nav > ion-page > ion-header,
ion-tab > ion-page > ion-header,
ion-menu {
@include toolbar-statusbar-padding($toolbar-ios-height, $content-ios-padding);
@include toolbar-title-statusbar-padding($toolbar-ios-height, $content-ios-padding);
}

@media only screen and (max-width: $cordova-ios-statusbar-padding-modal-max-width) {
.modal-wrapper > ion-modal-inner {
.modal-wrapper > ion-page > ion-header {
@include toolbar-statusbar-padding($toolbar-ios-height, $content-ios-padding);
@include toolbar-title-statusbar-padding($toolbar-ios-height, $content-ios-padding);
}
Expand Down
7 changes: 3 additions & 4 deletions src/platform/cordova.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
$cordova-md-statusbar-padding-modal-max-width: $cordova-statusbar-padding-modal-max-width !default;


@include navbar-section-statusbar-padding($toolbar-md-height);

.tab-subpage,
ion-nav > ion-page,
ion-nav > ion-page > ion-header,
ion-tab > ion-page > ion-header,
ion-menu {
@include toolbar-statusbar-padding($toolbar-md-height, $content-md-padding);
}

@media only screen and (max-width: $cordova-md-statusbar-padding-modal-max-width) {
.modal-wrapper > ion-modal-inner {
.modal-wrapper > ion-page > ion-header {
@include toolbar-statusbar-padding($toolbar-md-height, $content-md-padding);
}
}
33 changes: 1 addition & 32 deletions src/platform/cordova.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,8 @@ $cordova-statusbar-padding-modal-max-width: 767px !default;

}

// The navbar section should get modified height and padding-top for the status bar
// --------------------------------------------------------------------------------

@mixin navbar-section-statusbar-padding($toolbar-height) {

ion-navbar-section.statusbar-padding {
height: calc(#{$toolbar-height} + #{$cordova-ios-statusbar-padding});
min-height: calc(#{$toolbar-height} + #{$cordova-ios-statusbar-padding});
}

ion-navbar-section.statusbar-padding > .toolbar {
padding-top: $cordova-ios-statusbar-padding;

height: calc(#{$toolbar-height} + #{$cordova-ios-statusbar-padding});
min-height: calc(#{$toolbar-height} + #{$cordova-ios-statusbar-padding});
}

}


// iOS is the only mode that uses these mixins and they should be removed with #5036
// iOS is the only mode that uses this mixins and it should be removed with #5036
// --------------------------------------------------------------------------------

@mixin toolbar-title-statusbar-padding($toolbar-height, $content-padding) {
Expand All @@ -67,15 +48,3 @@ $cordova-statusbar-padding-modal-max-width: 767px !default;
}

}

@mixin navbar-section-title-statusbar-padding($toolbar-height) {

ion-navbar-section.statusbar-padding > .toolbar ion-segment,
ion-navbar-section.statusbar-padding > .toolbar ion-title {
padding-top: $cordova-ios-statusbar-padding;

height: calc(#{$toolbar-height} + #{$cordova-ios-statusbar-padding});
min-height: calc(#{$toolbar-height} + #{$cordova-ios-statusbar-padding});
}

}
7 changes: 3 additions & 4 deletions src/platform/cordova.wp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
$cordova-wp-statusbar-padding-modal-max-width: $cordova-statusbar-padding-modal-max-width !default;


@include navbar-section-statusbar-padding($toolbar-wp-height);

.tab-subpage,
ion-nav > ion-page,
ion-nav > ion-page > ion-header,
ion-tab > ion-page > ion-header,
ion-menu {
@include toolbar-statusbar-padding($toolbar-wp-height, $content-wp-padding);
}

@media only screen and (max-width: $cordova-wp-statusbar-padding-modal-max-width) {
.modal-wrapper > ion-modal-inner {
.modal-wrapper > ion-page > ion-header {
@include toolbar-statusbar-padding($toolbar-wp-height, $content-wp-padding);
}
}

0 comments on commit 15642e4

Please sign in to comment.