feat(NavBar): add safe-area-inset-top prop
This commit is contained in:
+21
-13
@@ -1,25 +1,12 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-nav-bar {
|
||||
position: relative;
|
||||
z-index: @nav-bar-z-index;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: @nav-bar-height;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
background-color: @nav-bar-background-color;
|
||||
user-select: none;
|
||||
|
||||
.van-icon {
|
||||
color: @nav-bar-icon-color;
|
||||
}
|
||||
|
||||
&__arrow {
|
||||
margin-right: @padding-base;
|
||||
font-size: @nav-bar-arrow-size;
|
||||
}
|
||||
|
||||
&--fixed {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -27,6 +14,27 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&--safe-area-inset-top {
|
||||
padding-top: constant(safe-area-inset-bottom);
|
||||
padding-top: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.van-icon {
|
||||
color: @nav-bar-icon-color;
|
||||
}
|
||||
|
||||
&__content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: @nav-bar-height;
|
||||
}
|
||||
|
||||
&__arrow {
|
||||
margin-right: @padding-base;
|
||||
font-size: @nav-bar-arrow-size;
|
||||
}
|
||||
|
||||
&__title {
|
||||
max-width: 60%;
|
||||
margin: 0 auto;
|
||||
|
||||
Reference in New Issue
Block a user