Re: [csswg-drafts] [css-text] 'white-space: break-spaces' applies to other space separators as well (#4522)

I am tripping over this area as well, I think for exactly the same reasons. I agree - your first quoted text refers only to "white space characters" and does not include "other space characters". But the breaking properties of these "other space characters" is also controlled by this property - surely this paragraph is the place to state that.

I'm also left confused as to whether break opportunities exist before other space characters. First we have this:

> 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, for pre-wrap, a soft wrap opportunity exists at the end of a sequence of spaces and/or tabs, while for break-spaces, a soft wrap opportunity exists after every space and every tab.

which tells us break opportunities exist *after* every space and tab. But then we have the second paragraph quoted by Javi above, which tells us that overflowing "normal" or "other" spaces should wrap - implying there is a break opportunity *before* every space, tab and other space as well.

This is backed up by the expected behaviour from [trailing-other-space-separators-break-spaces-015.html](https://github.com/web-platform-tests/wpt/blob/master/css/css-text/white-space/trailing-other-space-separators-break-spaces-015.html) and friends, which presume break opportunities before characters of class BA.

Finally we have Florian's comments in #4267:

> So in a sequence of ideographic spaces with pre-wrap, they keep their normal line breaking behavior defined in UAX14's BA class: a wrapping opportunity is allowed after each (and if due to some other character, there was a wrapping opportunity before, it is not suppressed), and they don't get merged into an unbreakable sequence.

I found this very confusing, as breaking before a BA is definitely not the normal behaviour of UAX14. I believe the intention of the second paragraph quoted by Javi, above, is to override that. Breaking afer BA, however, _is_ normal behaviour. So to sum up:

* we can break after normal spaces (says first quoted paragraph above)
* we can break before normal spaces and "other spaces" (says Javi's second quoted paragraph)
* we can break after "other spaces" (says UAX14)

This looks a lot like "soft wrap opportunities exist both before and after any character of class Zs". Which is so much simpler than the existing definition that I'm sure I've misunderstood something.

-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4522#issuecomment-573956911 using your GitHub account

Received on Tuesday, 14 January 2020 01:36:00 UTC