@import '../common/style/var.less'; @import '../common/style/theme.less'; .van-tabs { position: relative; -webkit-tap-highlight-color: transparent; &__wrap { display: flex; overflow: hidden; &--scrollable { .van-tab { flex: 0 0 22%; } } } &__scroll { .theme(background-color, '@tabs-nav-background-color'); &--line { box-sizing: content-box; height: calc(100% + 15px); /* 15px padding to hide scrollbar in mobile safari */ } &--card { .theme(margin, '0 @padding-md'); } } &__nav { position: relative; display: flex; user-select: none; &--card { box-sizing: border-box; .theme(height, '@tabs-card-height'); .theme(border, '@border-width-base solid @tabs-default-color'); .theme(border-radius, '@border-radius-sm'); .van-tab { .theme(color, '@tabs-default-color'); .theme(line-height, 'calc(@tabs-card-height - 2 * @border-width-base)'); .theme(border-right, '@border-width-base solid @tabs-default-color'); &:last-child { border-right: none; } &.van-tab--active { .theme(color, '@white'); .theme(background-color, '@tabs-default-color'); } &--disabled { .theme(color, '@tab-disabled-text-color'); } } } } &__line { position: absolute; bottom: 0; left: 0; z-index: 1; .theme(height, '@tabs-bottom-bar-height'); .theme(border-radius, '@tabs-bottom-bar-height'); .theme(background-color, '@tabs-bottom-bar-color'); } &__track { position: relative; } &__content { overflow: hidden; } &--line { .van-tabs__wrap { .theme(height, '@tabs-line-height'); } } &--card { .van-tabs__wrap { .theme(height, '@tabs-card-height'); } } } .van-tab { position: relative; flex: 1; box-sizing: border-box; min-width: 0; /* hack for flex ellipsis */ padding: 0 5px; text-align: center; cursor: pointer; .theme(color, '@tab-text-color'); .theme(font-size, '@tab-font-size'); .theme(line-height, '@tabs-line-height'); &--active { .theme(font-weight, '@font-weight-bold'); .theme(color, '@tab-active-text-color'); } &--disabled { .theme(color, '@tab-disabled-text-color'); } &__title { &__info { position: relative !important; top: -1px !important; display: inline-block; transform: translateX(0) !important; } } }