Skip to content

Instantly share code, notes, and snippets.

@ihorbond
Created July 1, 2020 21:13
Show Gist options
  • Save ihorbond/7929affc5898b02ab8c1924c6fad3130 to your computer and use it in GitHub Desktop.
Save ihorbond/7929affc5898b02ab8c1924c6fad3130 to your computer and use it in GitHub Desktop.
Clamp text with ellipsis after certain number of lines
.clamp {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment