Skip to content

Instantly share code, notes, and snippets.

View vpdc's full-sized avatar

Vince Paul Dela Cruz vpdc

View GitHub Profile
@mttmzr
mttmzr / is-truncated.js
Last active February 1, 2022 05:23
Simple javascript function to check if an element is truncated.
/**
* Check if an element is truncated.
*
* CSS to be used:
* .truncate {
* width: 250px;
* white-space: nowrap;
* overflow: hidden;
* text-overflow: ellipsis;
* }