Skip to content

Commit

Permalink
Fixing css iPhone X.
Browse files Browse the repository at this point in the history
Tabs on top was broken on iPhone X.
Navbar with input was broken on iPhone X.

Fixes ionic-team/ionic-framework#13270.
  • Loading branch information
israelrios committed Feb 2, 2018
1 parent eefba13 commit 75945df
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scss/_platform.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

&.item-input-inset .item-input-wrapper {
margin-top: 19px !important;
margin-top: constant(safe-area-inset-top) !important;
margin-top: env(safe-area-inset-top) !important;
}

> * {
Expand All @@ -25,7 +27,7 @@
}
}
.bar-header {
padding-left: calc( constant(safe-area-inset-left) + #{$bar-padding-portrait});
padding-left: calc(constant(safe-area-inset-left) + #{$bar-padding-portrait});
padding-left: calc(env(safe-area-inset-left) + #{$bar-padding-portrait});
padding-right: calc(constant(safe-area-inset-right) + #{$bar-padding-portrait});
padding-right: calc(env(safe-area-inset-right) + #{$bar-padding-portrait});
Expand All @@ -43,14 +45,17 @@

.tabs-top > .tabs, .tabs.tabs-top {
top: $bar-height + $ios-statusbar-height;
top: calc(constant(safe-area-inset-top) + #{$bar-height});
top: calc(env(safe-area-inset-top) + #{$bar-height});
}

.tabs {
.tabs-bottom > .tabs, .tabs.tabs-bottom{
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
height: calc(constant(safe-area-inset-bottom) + 49px);
height: calc(env(safe-area-inset-bottom) + 49px);
height: calc(constant(safe-area-inset-bottom) + #{$tabs-height});
height: calc(env(safe-area-inset-bottom) + #{$tabs-height});
}

.has-header, .bar-subheader {
top: $bar-height + $ios-statusbar-height;
top: calc(constant(safe-area-inset-top) + #{$bar-height});
Expand Down

0 comments on commit 75945df

Please sign in to comment.