When truncation with text-overflow: ellipsis crosses the line
Eric Eggert argues that text-overflow: ellipsis has a handful of legitimate uses and a great many illegitimate ones. A reasonable example: a table of titles and descriptions, where the description is held to a single line on small viewports so the title keeps its room, and the full description appears again on the item's detail page. More common, however, is the technique applied to buttons or form labels purely for visual tidiness or vertical alignment. Resize the viewport or the text and the tail of the label simply vanishes.
That risk fits into a broader problem of data loss in CSS: content that overflows its container unintentionally is absent from the page, and users cannot miss what is not rendered.
Truncated text cannot be recovered
Once text-overflow: ellipsis removes the tail of a string, there is no way for the user to bring it back — the data is effectively lost, though screen readers reportedly do announce the truncated text. Accepting that trade-off is defensible only when the author knows it is happening and intends it.
Eggert's rule of thumb:
Don't constrain the content to fit your design, make your CSS flexible to handle longer words gracefully.
Content can be forced to match a design, but the better default is the reverse: the design bends to the content. It is hard to name a case where page text is so unimportant that cutting it at an arbitrary point chosen by a CSS property is acceptable. An archive listing that shows an excerpt before truncating doesn't qualify — that's an excerpt, not an application of text-overflow: ellipsis.
Defensive CSS as the alternative
CSS already offers the tools for flexible layouts that absorb varying text lengths. Writing defensive CSS — anticipating content problems and handling them gracefully — is the safer route. text-overflow: ellipsis can be one item in that toolkit, but it can equally discard what matters. Before shortening any content, ask what that content is meant to accomplish and whether losing it is worth the cost.
- Related reading: line-clamp truncation, using flexbox alongside
text-overflow: ellipsis, and multiline truncation with a "show more" button, all collected under CSS-Tricks'line-clampand truncation tags.



