-
Notifications
You must be signed in to change notification settings - Fork 756
Description
Current spec: https://www.w3.org/TR/2018/WD-css-overflow-3-20180731/#auto-ellipsis
Chrome issue: https://bugs.chromium.org/p/chromium/issues/detail?id=980476.
Background:
The use of text-overflow: ellipsis will make overflowing text hidden from users. At the very pixel where the ellipsis appear, the overflow is undetectable. This means that some characters will be permanently hidden from users, and that there's no workaround for developers.
Issue:
This issue only appear at the exact pixel where ellipses appear.
For some text content, rounding of scrollWidth will make queried scrollWidth, clientWidth or DOMRect identical, despite the text-overflow.
Here is a codepen where overflow appears despite scrollWidth == clientWidth:
https://codepen.io/anon/pen/XvrzQV
This issue makes text-overflow: ellipsis unusable in some contexts.
For example in the healthcare, where doctors must have complete access to all information at all times.
The spec should mandate that if an element has ellipsized text, then that must be detectable.