style(Tab): improve text size adjust, fix ellipsis issue (#6209)
This commit is contained in:
+14
-6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user