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

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 using your GitHub account

Received on Friday, 13 July 2018 10:33:00 UTC