style(Tab): improve text size adjust, fix ellipsis issue (#6209)

This commit is contained in:
neverland
2020-05-04 16:42:47 +08:00
committed by GitHub
parent aa125ac06b
commit 06b0c59d2d
10 changed files with 148 additions and 123 deletions
+14 -6
View File
@@ -2,14 +2,14 @@
.van-tab {
position: relative;
display: flex;
align-items: center;
justify-content: center;
flex: 1;
box-sizing: border-box;
min-width: 0; // hack for flex ellipsis
padding: 0 5px;
padding: 0 @padding-base;
color: @tab-text-color;
font-size: @tab-font-size;
line-height: @tabs-line-height;
text-align: center;
cursor: pointer;
&--active {
@@ -23,6 +23,15 @@
}
&__text {
&--ellipsis {
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
}
&__text-wrapper {
position: relative;
}
}
@@ -52,8 +61,8 @@
}
.van-tabs__nav {
overflow: hidden;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar {
@@ -84,7 +93,6 @@
.van-tab {
color: @tabs-default-color;
line-height: @tabs-card-height - 2px;
border-right: @border-width-base solid @tabs-default-color;
&:last-child {