Skip to content

Commit f5bc0a7

Browse files
author
allen
committed
feat: 样式优化
1 parent 3d75b19 commit f5bc0a7

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/styles/variable.scss

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
@mixin trim($numLines: null) {
2+
overflow: hidden;
23
@if $numLines != null {
3-
display: flex;
4-
overflow-y: hidden;
4+
// stylelint-disable-next-line
5+
display: -webkit-box;
56
-webkit-line-clamp: $numLines;
67
-webkit-box-orient: vertical;
78
} @else {
89
display: block;
9-
overflow: hidden;
1010
text-overflow: ellipsis;
1111
white-space: nowrap;
1212
}
1313
}
14-
.line1 {
15-
@include trim;
16-
}
17-
.line2 {
18-
@include trim(2);
14+
@for $i from 1 through 5 {
15+
.max-line-#{$i} {
16+
@include trim($i);
17+
}
1918
}

0 commit comments

Comments
 (0)