WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
84448
combining text-align: justify with white-space: pre-wrap does not justify the text
https://bugs.webkit.org/show_bug.cgi?id=84448
Summary
combining text-align: justify with white-space: pre-wrap does not justify the...
Jelte Liebrand
Reported
2012-04-20 06:53:32 PDT
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.
Attachments
Test html file
(3.98 KB, text/html)
2012-04-20 06:53 PDT
,
Jelte Liebrand
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Tab Atkins
Comment 1
2012-04-20 08:18:45 PDT
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.
Bence Meszaros
Comment 2
2021-04-05 10:35:54 PDT
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!
shaulgo
Comment 3
2021-05-23 12:36:06 PDT
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
Radar WebKit Bug Importer
Comment 4
2021-05-24 09:52:55 PDT
<
rdar://problem/78405178
>
alan
Comment 5
2022-10-02 12:47:01 PDT
The attached test case works fine. It's an IFC progression.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug