Skip to content

[css-overflow] It should be detectable whether an element ellipsized the text #4123

@blidblid

Description

@blidblid

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions