[breaking change] rebuild style struct (#2021)
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-tabs {
|
||||
position: relative;
|
||||
|
||||
&__wrap {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
|
||||
&--page-top {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
&--content-bottom {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
&--scrollable {
|
||||
.van-tab {
|
||||
flex: 0 0 22%;
|
||||
}
|
||||
|
||||
.van-tabs__nav {
|
||||
overflow: hidden;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__nav {
|
||||
display: flex;
|
||||
user-select: none;
|
||||
position: relative;
|
||||
background-color: @white;
|
||||
|
||||
&--line {
|
||||
height: 100%;
|
||||
padding-bottom: 15px; /* 15px padding to hide scrollbar in mobile safari */
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
&--card {
|
||||
margin: 0 15px;
|
||||
border-radius: 2px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid @red;
|
||||
height: @van-tabs-card-height;
|
||||
|
||||
.van-tab {
|
||||
color: @red;
|
||||
border-right: 1px solid @red;
|
||||
line-height: @van-tabs-card-height - 2px;
|
||||
|
||||
&:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
&.van-tab--active {
|
||||
color: @white;
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
color: @gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__line {
|
||||
z-index: 1;
|
||||
left: 0;
|
||||
bottom: 15px;
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
border-radius: 2px 0;
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
&--line {
|
||||
padding-top: @van-tabs-line-height;
|
||||
|
||||
.van-tabs__wrap {
|
||||
height: @van-tabs-line-height;
|
||||
}
|
||||
}
|
||||
|
||||
&--card {
|
||||
padding-top: @van-tabs-card-height;
|
||||
|
||||
.van-tabs__wrap {
|
||||
height: @van-tabs-card-height;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user