Created
February 9, 2016 09:31
-
-
Save csergiu/7d6f0cb4d8feb6bd84a6 to your computer and use it in GitHub Desktop.
trim lines with css
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
@mixin giveMeEllipsis($lines, $lh) { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
display: -webkit-box; | |
-webkit-box-orient: vertical; | |
-webkit-line-clamp: $lines; /* number of lines to show */ | |
line-height: $lh; /* fallback */ | |
max-height: $lh*$lines; /* fallback */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment