38 lines
708 B
Plaintext
38 lines
708 B
Plaintext
// 混合宏(flex、文本省略、滚动条)
|
||
|
||
.flex(@direction: row; @justify: flex-start; @align: center) {
|
||
display: flex;
|
||
flex-direction: @direction;
|
||
justify-content: @justify;
|
||
align-items: @align;
|
||
}
|
||
|
||
.ellipsis() {
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.multi-ellipsis(@lines: 2) {
|
||
display: -webkit-box;
|
||
-webkit-box-orient: vertical;
|
||
-webkit-line-clamp: @lines;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.scrollbar(@width: 6px) {
|
||
&::-webkit-scrollbar {
|
||
width: @width;
|
||
height: @width;
|
||
}
|
||
|
||
&::-webkit-scrollbar-thumb {
|
||
background: @border-color-dark;
|
||
border-radius: @radius-round;
|
||
}
|
||
|
||
&::-webkit-scrollbar-track {
|
||
background: transparent;
|
||
}
|
||
}
|