[csswg-drafts] [css-text] full-width spaces not covered in the collapsible/preserved space definition (#4267)

javifernandez has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text] full-width spaces not covered in the collapsible/preserved space definition ==
According to the last draft of the CSS Text specification, this is the definition of the 'white space' term:

https://drafts.csswg.org/css-text-3/#white-space
> Except where specified otherwise, White space processing in CSS affects only the document white space characters: spaces (U+0020), tabs (U+0009), and segment breaks. 

First of all, I wonder what "Except where specified otherwise" actually means; in my opinion this statement makes harder to understand other dependent terms, like the ones I'm trying to clarify in this issue later.

Then, it's stated in the spec that full-width spaces, like x3000 (ideographic space), are defined as 'other space separators': 

 https://drafts.csswg.org/css-text-3/#other-space-separators
> Besides Space (U+0020) and No-Break Space (U+00A0), Unicode [UNICODE] defines a number of additional space separator characters. In this specification all characters in the Unicode Zs category (See [UAX44]) except Space (U+0020) and No-Break Space (U+00A0) are collectively referred to as other space separators. 

So at this point, I understand that every time I read "white space" in the spec it doesn't apply to full-width spaces like U+3000 (ideographic space). Is this correct ? 

So then we have the definition of "collapsible space", which is specified as follow:

https://drafts.csswg.org/css-text-3/#collapse
> If white-space is set to normal, nowrap, or pre-line, white space characters are considered collapsible

Since the definition above uses the term "white space", I understand that full-width spaces are excluded from that definition; hence ideographic spaces are never collapsible spaces. Is this correct ? 

Then there is the statement about soft wrapping opportunities activated by the white-space property:

> 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. 

In the statement above, the term uses is just "space", so I assume that such term includes also the "other space separator" category; hence, there are soft wrap opportunities **at the end** of the sequence of ideographic spaces. Again, I wonder whether this assumption about full-width spaces is correct.

It's also interesting to consider that there may be soft wrap opportunities in the middle of a sequence of full-width spaces (considered as other space separators) if the value of the white-space is either "break-spaces" or "normal"; see your comment on issue #4180, as follows:

> wrapping opportunities are allowed after every ideographic space (cf: https://www.unicode.org/reports/tr14/tr14-39.html#BA)

I guess this depends on the value of the line-break property, correct ? Is this the case of regular white spaces (eg. U+0020) so that 'white-space: normal' may allow wrap opportunities after every space ?

Finally we have the definition of 'preserved white space', which is described by the spec as follows:

https://drafts.csswg.org/css-text-3/#preserved-white-space
> White space that was not removed or collapsed due to white space processing is called preserved white space.

Again, since the statement above uses the term "white space" it implies that any character in the "other space separators" group is excluded; hence, I understand that full-width spaces, like U+3000, can't be considered preserved spaces. Is this correct ? 

These definitions are very important, specially for the specification of the white-space property and its different values, which most of them use the term "white space", without mentioning the 'other space separator' term. They have some implications about how to compute the intrinsic size when there are 'other space separator' characters involved. But lets first clarify the definitions above before entering on these other issues. 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4267 using your GitHub account

Received on Monday, 2 September 2019 21:23:45 UTC