I have a dynamic text in a span. I would like to use line-clamp: 2.
In that case there are max. 2 lines of text and the rest is truncated by ….
That works with:
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
My problem: If the content is truncated, a tooltip should be displayed. How can I detect whether the text is clamped?
The height of the element is the same, innerHTML is same... I have no further idea...
