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
// e.g: @include truncate(.875em, 1.4, 10) | |
@mixin truncate($font-size, $line-height, $lines-to-show) { | |
display: block; // Fallback for non-webkit | |
display: -webkit-box; | |
max-width: 400px; | |
height: $font-size*$line-height*$lines-to-show; // Fallback for non-webkit | |
font-size: $font-size; | |
line-height: $line-height; | |
-webkit-line-clamp: $lines-to-show; | |
-webkit-box-orient: vertical; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment