Open Bug 1564865 Opened 5 years ago Updated 2 years ago

text-align-last doesn't work properly with line-clamp /overflow: hidden

Categories

(Core :: Layout: Block and Inline, enhancement, P5)

68 Branch
enhancement

Tracking

()

People

(Reporter: sigurdur, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36

Steps to reproduce:

  1. Write content that spans 3+ lines
  2. Set text-align to justify
  3. Set text-align-last to center
  4. Set line-clamp to 2 lines (ellipsis optional)
  5. Set overflow to hidden
  6. Last visible line is now justified, not centered.

Codepen showing the results: https://codepen.io/sigurdur/pen/KjJMRL

Actual results:

The last line, which is hidden, is centered but not the visible line.
The last visible line is not centered.

Expected results:

Last visible line should be centered.

Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Hi,

I have managed to reproduce this issue on latest FF release 68.0 and latest Nightly build 70.0a1 (2019-07-15) using Ubuntu 18.04 and Windows 10.
The issue is also reproducible on Chrome and IE so I'm not sure this is a specific Firefox issue.

I will move this over to a component so developers can take a look over it and give us their opinion. If is not the correct component please feel free to change it to an appropriate one.

Thanks for the report.

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

This is the same as it works in Chrome and WebKit right?

Type: defect → enhancement
Component: CSS Parsing and Computation → Layout: Block and Inline

Given -webkit-line-clamp was implemented for compat and that we're interoperable, it's not clear what should we do here.

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

Attachment

General

Creator:
Created:
Updated:
Size: