Closed Bug 1603179 Opened 5 years ago Closed 11 months ago

Right to left language overflows container when using the pseudo-element first-letter

Categories

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

71 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1225416

People

(Reporter: ana.rdrg, Unassigned)

References

Details

(Keywords: rtl)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36

Steps to reproduce:

Have a container with a fixed width. Adding a couple of paragraphs with arabic text and apply :first-letter styling to the paragraphs.

I created a codepen were the issue can be reproduced: https://codepen.io/ohhelloana/pen/dyPYXgV

Actual results:

When :first-letter is applied, regardless of the font size, the content of the paragraphs may overflow the container.

Expected results:

The content should have done an automatic word-wrap. However if word-wrap styling is applied, the words break in the middle of latin words and numbers and that causes a different issue.

Component: Untriaged → Layout
Keywords: rtl
Product: Firefox → Core

Maybe / probably related to bug 362880. First-letter is quite broken... But it is weird this affects line-breaking on following lines... Maybe it rings a bell Jonathan?

Status: UNCONFIRMED → NEW
Component: Layout → Layout: Text and Fonts
Ever confirmed: true
Priority: -- → P3
See Also: → 362880

(Thanks for reporting it btw!)

This has been broken all the way through Firefox 20 at least, not a recent regression at all :/

Severity: normal → S3
Severity: normal → S3

The trigger for the issue here is not just that the content is RTL and uses ::first-letter, but also that there's a bit of LTR text within the paragraph. The same can happen for primarily-LTR content if there's an RTL run within the text, and ::first-letter is used. The resulting bidi continuations are interfering with assumptions in our (rather broken) ::first-letter implementation.

Status: NEW → RESOLVED
Closed: 11 months ago
Duplicate of bug: 1225416
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: