Created attachment 138086 [details] Test html file At the moment, webkit does not justify text if the text also has white-space: pre-wrap set. I've attached a small sample test html page to show this problem. According to the CSS3 specification however, the UA could choose to indeed justify the text in these cases, as long as tab stop positions are adhered to. Here's the relevant text from the spec: In the case of ‘justify’, the UA may stretch or shrink any inline boxes by adjusting their text in addition to shifting their positions. (See also ‘text-justify’, ‘letter-spacing’, and ‘word-spacing’.) If an element's white space is set to be non-collapsible, then the UA is not required to adjust its text for the purpose of justification and may instead treat the text as having no expansion opportunities. If the UA chooses to adjust the text, then it must ensure that tab stops continue to line up as required by the white space processing rules. It would be very useful to add this ability, so that we can represent more word processing like features where end users tend to use multiple white spaces to layout their text, whilst also being able to justify align their paragraphs.
In particular, the layout strategy we'd like here (matching Word and other similar apps) is to justify the section of the line after the last tab stop on the line.
Hi Everyone, I stumbled upon this "bug" too and I could not find a viable workaround. Either I need to forget about justifying text or let the browser strip away necessary white space characters, both of which are unacceptable for a decent web based text editor. Is there a chance that this might be implemented in the near future? Thank you!
Hey, what's the chance of prioritizing this? It make for a very bad cross browser experience. And makes very hard to develop text editor with justification capabilities. Thanks
<rdar://problem/78405178>
The attached test case works fine. It's an IFC progression.