155 lines
3.6 KiB
CSS
155 lines
3.6 KiB
CSS
:root {
|
|
--van-sticky-z-index: 99;
|
|
}
|
|
.van-sticky--fixed {
|
|
position: fixed;
|
|
z-index: var(--van-sticky-z-index);
|
|
}
|
|
:root {
|
|
--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-2);
|
|
--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;
|
|
}
|
|
.van-tab--active {
|
|
color: var(--van-tab-active-text-color);
|
|
font-weight: var(--van-font-bold);
|
|
}
|
|
.van-tab--disabled {
|
|
color: var(--van-tab-disabled-text-color);
|
|
cursor: not-allowed;
|
|
}
|
|
.van-tab--grow {
|
|
flex: 1 0 auto;
|
|
padding: 0 var(--van-padding-sm);
|
|
}
|
|
.van-tab--shrink {
|
|
flex: none;
|
|
padding: 0 var(--van-padding-xs);
|
|
}
|
|
.van-tab--card {
|
|
color: var(--van-tabs-default-color);
|
|
border-right: var(--van-border-width) solid var(--van-tabs-default-color);
|
|
}
|
|
.van-tab--card:last-child {
|
|
border-right: none;
|
|
}
|
|
.van-tab--card.van-tab--active {
|
|
color: var(--van-white);
|
|
background-color: var(--van-tabs-default-color);
|
|
}
|
|
.van-tab--card--disabled {
|
|
color: var(--van-tab-disabled-text-color);
|
|
}
|
|
.van-tab__text--ellipsis {
|
|
display: -webkit-box;
|
|
overflow: hidden;
|
|
-webkit-line-clamp: 1;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
.van-tabs {
|
|
position: relative;
|
|
}
|
|
.van-tabs__wrap {
|
|
overflow: hidden;
|
|
}
|
|
.van-tabs__wrap--page-top {
|
|
position: fixed;
|
|
}
|
|
.van-tabs__wrap--content-bottom {
|
|
top: auto;
|
|
bottom: 0;
|
|
}
|
|
.van-tabs__nav {
|
|
position: relative;
|
|
display: flex;
|
|
background: var(--van-tabs-nav-background);
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
}
|
|
.van-tabs__nav--complete {
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
.van-tabs__nav--complete::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
.van-tabs__nav--line {
|
|
box-sizing: content-box;
|
|
height: 100%;
|
|
padding-bottom: 15px;
|
|
}
|
|
.van-tabs__nav--line.van-tabs__nav--shrink,
|
|
.van-tabs__nav--line.van-tabs__nav--complete {
|
|
padding-right: var(--van-padding-xs);
|
|
padding-left: var(--van-padding-xs);
|
|
}
|
|
.van-tabs__nav--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);
|
|
}
|
|
.van-tabs__nav--card.van-tabs__nav--shrink {
|
|
display: inline-flex;
|
|
}
|
|
.van-tabs__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);
|
|
}
|
|
.van-tabs__track {
|
|
position: relative;
|
|
display: flex;
|
|
width: 100%;
|
|
height: 100%;
|
|
will-change: left;
|
|
}
|
|
.van-tabs__content--animated {
|
|
overflow: hidden;
|
|
}
|
|
.van-tabs--line .van-tabs__wrap {
|
|
height: var(--van-tabs-line-height);
|
|
}
|
|
.van-tabs--card > .van-tabs__wrap {
|
|
height: var(--van-tabs-card-height);
|
|
}
|
|
.van-tab__panel,
|
|
.van-tab__panel-wrapper {
|
|
flex-shrink: 0;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
}
|
|
.van-tab__panel-wrapper--inactive {
|
|
height: 0;
|
|
overflow: visible;
|
|
}
|