171 lines
3.4 KiB
Plaintext
171 lines
3.4 KiB
Plaintext
body {
|
|
--van-tab-text-color: var(--van-gray-7);
|
|
--van-tab-active-text-color: var(--van-text-color);
|
|
--van-tab-disabled-text-color: var(--van-text-color-3);
|
|
--van-tab-font-size: var(--van-font-size-md);
|
|
--van-tab-line-height: var(--van-line-height-md);
|
|
--van-tabs-default-color: var(--van-primary-color);
|
|
--van-tabs-line-height: 44px;
|
|
--van-tabs-card-height: 30px;
|
|
--van-tabs-nav-background: var(--van-background-light);
|
|
--van-tabs-bottom-bar-width: 40px;
|
|
--van-tabs-bottom-bar-height: 3px;
|
|
--van-tabs-bottom-bar-color: var(--van-primary-color);
|
|
}
|
|
|
|
.van-tab {
|
|
position: relative;
|
|
display: flex;
|
|
flex: 1;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-sizing: border-box;
|
|
padding: 0 var(--van-padding-base);
|
|
color: var(--van-tab-text-color);
|
|
font-size: var(--van-tab-font-size);
|
|
line-height: var(--van-tab-line-height);
|
|
cursor: pointer;
|
|
|
|
&--active {
|
|
color: var(--van-tab-active-text-color);
|
|
font-weight: var(--van-font-bold);
|
|
}
|
|
|
|
&--disabled {
|
|
color: var(--van-tab-disabled-text-color);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
&--grow {
|
|
flex: 1 0 auto;
|
|
padding: 0 var(--van-padding-sm);
|
|
}
|
|
|
|
&--shrink {
|
|
flex: none;
|
|
padding: 0 var(--van-padding-xs);
|
|
}
|
|
|
|
&--card {
|
|
color: var(--van-tabs-default-color);
|
|
border-right: var(--van-border-width) solid var(--van-tabs-default-color);
|
|
|
|
&:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
&.van-tab--active {
|
|
color: var(--van-white);
|
|
background-color: var(--van-tabs-default-color);
|
|
}
|
|
|
|
&--disabled {
|
|
color: var(--van-tab-disabled-text-color);
|
|
}
|
|
}
|
|
|
|
&__text {
|
|
&--ellipsis {
|
|
display: -webkit-box;
|
|
overflow: hidden;
|
|
-webkit-line-clamp: 1;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
}
|
|
}
|
|
|
|
.van-tabs {
|
|
position: relative;
|
|
|
|
&__wrap {
|
|
overflow: hidden;
|
|
|
|
&--page-top {
|
|
position: fixed;
|
|
}
|
|
|
|
&--content-bottom {
|
|
top: auto;
|
|
bottom: 0;
|
|
}
|
|
}
|
|
|
|
&__nav {
|
|
position: relative;
|
|
display: flex;
|
|
background: var(--van-tabs-nav-background);
|
|
user-select: none;
|
|
|
|
&--complete {
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
&::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&--line {
|
|
box-sizing: content-box;
|
|
height: 100%;
|
|
padding-bottom: 15px; /* 15px padding to hide scrollbar in mobile safari */
|
|
}
|
|
|
|
&--line&--shrink,
|
|
&--line&--complete {
|
|
padding-right: var(--van-padding-xs);
|
|
padding-left: var(--van-padding-xs);
|
|
}
|
|
|
|
&--card {
|
|
box-sizing: border-box;
|
|
height: var(--van-tabs-card-height);
|
|
margin: 0 var(--van-padding-md);
|
|
border: var(--van-border-width) solid var(--van-tabs-default-color);
|
|
border-radius: var(--van-border-radius-sm);
|
|
}
|
|
|
|
&--card&--shrink {
|
|
display: inline-flex;
|
|
}
|
|
}
|
|
|
|
&__line {
|
|
position: absolute;
|
|
bottom: 15px;
|
|
left: 0;
|
|
z-index: 1;
|
|
width: var(--van-tabs-bottom-bar-width);
|
|
height: var(--van-tabs-bottom-bar-height);
|
|
background: var(--van-tabs-bottom-bar-color);
|
|
border-radius: var(--van-tabs-bottom-bar-height);
|
|
}
|
|
|
|
&__track {
|
|
position: relative;
|
|
display: flex;
|
|
width: 100%;
|
|
height: 100%;
|
|
will-change: left;
|
|
}
|
|
|
|
&__content {
|
|
&--animated {
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
&--line {
|
|
.van-tabs__wrap {
|
|
height: var(--van-tabs-line-height);
|
|
}
|
|
}
|
|
|
|
&--card {
|
|
> .van-tabs__wrap {
|
|
height: var(--van-tabs-card-height);
|
|
}
|
|
}
|
|
}
|