Right to left language overflows container when using the pseudo-element first-letter
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
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.
Updated•5 years ago
|
Comment 1•5 years ago
|
||
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?
Comment 2•5 years ago
|
||
(Thanks for reporting it btw!)
Comment 3•5 years ago
|
||
This has been broken all the way through Firefox 20 at least, not a recent regression at all :/
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•11 months ago
|
||
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.
Description
•