Skip to content

Instantly share code, notes, and snippets.

@whitep4nth3r
Created June 1, 2022 12:48
Show Gist options
  • Save whitep4nth3r/3e4e638201debb4132d0680bb5957274 to your computer and use it in GitHub Desktop.
Save whitep4nth3r/3e4e638201debb4132d0680bb5957274 to your computer and use it in GitHub Desktop.
Truncate text by height with ellipses (CSS)
.truncate {
overflow: hidden;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
display: -webkit-box;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment