text-overflow: ellipsis stops working if container width is sufficiently small
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: kevinkucharczyk, Unassigned)
References
Details
Attachments
(1 file)
2.40 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Steps to reproduce:
I have a container with text-overflow: ellipsis, which sometimes gets very narrow. See https://jsfiddle.net/0evj82z7/ for an example.
Actual results:
When the width of the container is very small (seems to be when the width is smaller than a single character + ellipsis), the ellipsis breaks entirely.
My Firefox version is 111.0.1 (64-bit)
Expected results:
Even on very small widths, the ellipsis should remain intact.
Updated•2 years ago
|
Comment 1•2 years ago
|
||
For background, there was some lengthy discussion about the behavior of text-overflow back in bug 690187, and I think that's where the behavior of suppressing the ellipsis if it doesn't fit (along with at least one character of the text) originates.
As I understand the spec text, the more correct behavior here would be to render the first character of the text followed by the ellipsis, with the ellipsis being clipped to the available width.
Description
•