Skip to content

Instantly share code, notes, and snippets.

@nocodesupplyco
Created December 16, 2022 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nocodesupplyco/f37815a9d66a5421cd89d17ad6ba871c to your computer and use it in GitHub Desktop.
Save nocodesupplyco/f37815a9d66a5421cd89d17ad6ba871c to your computer and use it in GitHub Desktop.
Multi-line Truncate
/*Apply "..." after 3 lines of text */
.text-style-3lines {
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
/*Apply "..." after 2 lines of text */
.text-style-2lines {
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment