TIL: The ballad of text-overflow
My notes from - https://www.tpgi.com/the-ballad-of-text-overflow/
text-overflow
property is inaccessible by design, because its only purpose is to hide text.
It doesn't provide any way to make the hidden content visible.
One might argue there are no valid use-cases for it, but I believe this one make some sense:
Table with long content in a row, which is limited to one line. Full content is available on the details page for a given row.
Alternatives to text truncation
The goal is to not rely on text truncation at all, just make the design flexible.
- Use flexbox or responsive grids for a flexible design.
- Use word-break to better control hard line-breaking.