Open Bug 1826695 Opened 2 years ago Updated 2 years ago

text-overflow: ellipsis stops working if container width is sufficiently small

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 111
defect

Tracking

()

People

(Reporter: kevinkucharczyk, Unassigned)

References

Details

Attachments

(1 file)

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.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core
See Also: → 1717859

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.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: