119 lines
1.8 KiB
CSS

@import '../common/style/var.css';
@import '../common/style/hairline.css';
$van-tabs-line-height: 44px;
$van-tabs-card-height: 30px;
.van-tabs {
position: relative;
-webkit-tap-highlight-color: transparent;
&__wrap {
top: 0;
left: 0;
right: 0;
z-index: 99;
position: absolute;
&--page-top {
position: fixed;
}
&--content-bottom {
top: auto;
bottom: 0;
}
&--scrollable {
.van-tab {
flex: 0 0 22%;
}
}
}
&__nav {
display: flex;
user-select: none;
position: relative;
background-color: $white;
&--line {
height: 100%;
}
&--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: calc($van-tabs-card-height - 2px);
&:last-child {
border-right: none;
}
&.van-tab--active {
color: $white;
background-color: $red;
}
}
}
}
&__line {
z-index: 1;
left: 0;
bottom: 0;
height: 2px;
position: absolute;
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;
}
}
}
.van-tab {
flex: 1;
cursor: pointer;
padding: 0 5px;
font-size: 14px;
position: relative;
color: $text-color;
line-height: $van-tabs-line-height;
text-align: center;
box-sizing: border-box;
background-color: $white;
min-width: 0; /* hack for flex ellipsis */
span {
display: block;
}
&--active {
color: $red;
}
&--disabled {
color: $gray;
}
}