diff --git a/asset/css/mixin/mixins.less b/asset/css/mixin/mixins.less index 3f2f107d..4729c494 100644 --- a/asset/css/mixin/mixins.less +++ b/asset/css/mixin/mixins.less @@ -18,3 +18,25 @@ -moz-box-shadow: @arguments; box-shadow: @arguments; } + +.line-clamp(@numOfLines: 2) when (@numOfLines > 1) { + display: -webkit-box; + -webkit-line-clamp: @numOfLines; + -webkit-box-orient: vertical; +} +.line-clamp(@numOfLines: 2) when (@numOfLines = "reset") { + display: revert; + -webkit-line-clamp: initial; + -webkit-box-orient: initial; +} + +.text-ellipsis() { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.text-ellipsis-multiline() { + overflow: hidden; + text-overflow: ellipsis; +}