Last active
September 28, 2015 20:52
-
-
Save djanix/9b88e1c219bb00c7dd76 to your computer and use it in GitHub Desktop.
multi-line text ellipsis mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//usage: @include ellipsis(3); | |
@mixin ellipsis($lineNumber, $lineHeight: 1.4em) { | |
display: -webkit-box; | |
line-height: $lineHeight; | |
max-height: $lineNumber * $lineHeight; | |
overflow: hidden; | |
-webkit-line-clamp: $lineNumber; | |
-webkit-box-orient: vertical; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment