@import '../style/var'; .van-tab { flex: 1; cursor: pointer; min-width: 0; // hack for flex ellipsis padding: 0 5px; font-size: 14px; position: relative; color: @gray-darker; line-height: @tabs-line-height; text-align: center; box-sizing: border-box; span { display: block; } &--active { font-weight: 500; color: @text-color; } &--disabled { color: @gray; } } .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%; &--complete { flex: 1 0 auto; } } .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: @tabs-card-height; .van-tab { color: @red; border-right: 1px solid @red; line-height: @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: 3px; position: absolute; border-radius: 3px; background-color: @red; } &__content { &--animated { overflow: hidden; } } &__track { position: relative; display: flex; width: 100%; height: 100%; will-change: left; } &--line { padding-top: @tabs-line-height; .van-tabs__wrap { height: @tabs-line-height; } } &--card { padding-top: @tabs-card-height; > .van-tabs__wrap { height: @tabs-card-height; } } .van-tab__pane { width: 100%; flex-shrink: 0; box-sizing: border-box; } }