Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
LiJiaPeng001 committed Dec 8, 2023
2 parents cd845bb + 7ad9278 commit 43208b1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions style/mixins/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "./text.less";
15 changes: 15 additions & 0 deletions style/mixins/test.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// 文字溢出省略
.ellipsis(@lines: 1, @width: 100%) {
overflow: hidden;
text-overflow: ellipsis;
& when (@lines = 1) {
width: @width;
white-space: nowrap;
}
& when (@lines > 1) {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: @lines;
word-break: break-all;
}
}

0 comments on commit 43208b1

Please sign in to comment.