css check if text is overflowing code example
Example: determine text truncate javascript
/**
* Check if an element is truncated.
*/
function isTruncated(el) {
return el.scrollWidth > el.clientWidth
}
/**
* Check if an element is truncated.
*/
function isTruncated(el) {
return el.scrollWidth > el.clientWidth
}