W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

Re: [csswg-drafts] [css-text] A single leading white-space shouuld prevent word breaking honoring white-space: pre-wrap

From: Javier Fernandez Garcia-Boente via GitHub <sysbot+gh@w3.org>
Date: Fri, 13 Jul 2018 10:32:57 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-404794808-1531477976-sysbot+gh@w3.org>
I'm asking confirmation of my understanding of current spec, indeed. I could't find where in the spec is stated that opportunities generated by break-all should go first than the ones provided by pre-wrap.

The second paragraph of the Line Breaking section states the following: 


> Wrapping is only performed at an allowed break point, called a soft wrap opportunity. When wrapping is enabled (see white-space), the UA must minimize the amount of content overflowing a line by wrapping the line at a soft wrap opportunity, if one exists.

I understand from that that wrapping, when enabled, should be one of the first steps. Then, in the white-space processing phase, the spec states the following:


> If white-space is set to pre, pre-wrap, or break-spaces any sequence of spaces is treated as a sequence of non-breaking spaces. However, a soft wrap opportunity exists at the end of the sequence.
> Then, the entire block is rendered. Inlines are laid out, taking bidi reordering into account, and wrapping as specified by the white-space property.

My understanding of the current spec is that in the cases we are evaluating here, the line-wrapping after the single leading white-space should happen first and, only then, apply additional breaking opportunities if needed, to avoid overflow. 

GitHub Notification of comment by javifernandez
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2907#issuecomment-404794808 using your GitHub account
Received on Friday, 13 July 2018 10:33:00 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:51 UTC