Skip to content

Commit

Permalink
Merge pull request Tencent#686 from uxsi/master
Browse files Browse the repository at this point in the history
iPhone media query
  • Loading branch information
progrape authored Nov 7, 2017
2 parents d73b587 + 7b5ddb0 commit 641743d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/example/example.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions src/example/example.less
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,16 @@ body, .page {
}

// iphone x
@iphonexSafeGap:44px;
@media only screen
and (device-width : 375px)
and (device-height : 812px)
and (-webkit-device-pixel-ratio : 3)
and (orientation : landscape) {
@supports (constant(safe-area-inset-top)){
.page{
padding:0 @iphonexSafeGap;
padding:constant(safe-area-inset-top) constant(safe-area-inset-right) constant(safe-area-inset-bottom) constant(safe-area-inset-left);
&.tabbar,&.navbar{
padding-left:0;
padding-right:0;
}
}
.weui-tab__panel{
padding-left:constant(safe-area-inset-left);
padding-right:constant(safe-area-inset-right);
}
}

0 comments on commit 641743d

Please sign in to comment.