Re: [csswg-drafts] [css-text-3] Audit details of break-spaces value against use cases

On the one hand, I agree that over all, the various properties that affect line breaking and space preservation are a complicated mess from a UI point of view, and are hardly intuitive. It can be explained why which does what, but that's not the same thing.

Within that, I think overflow-wrap: break-spaces is not that unusual. It is not terribly obvious why that's there, but it can work, and it can be explained: The property is to deal with wrapping when the line would overwise overflow. Spaces at the end of the line are defined to overflow as "hanging" (which is either just ink overflow, or scrollable overflow, see #2398). Therefore, dealing with it there is OK.

Arguably, the value could also be attached to the `word-break` (e.g. a series of preserved white spaces is some kind of special "word") or `line-break` (e.g. this affects how the line breaks) properties. I suppose that if we did so, the new grammar should be `[ currently accepted values ] || break-spaces`. I am not theoretically opposed to that, but I am not convinced it is a real improvement either. It is just as easy to justify the value not being on these properties: `word-break` is self described as being about "soft wrap opportunities between letters", and `line-break` says it's "particularly how wrapping interacts with punctuation and symbols". At one point we also argued that it should be a value on the white-space property. I see no end to this discussion if we keep on reopening it.

Anyway, I am not objecting to better property design if there is a better solution, but I think that most likely, the better thing to do is to give it a rest, keep the current design we landed on, let people implement this (at least igalia is about to, and comments from others suggest that it may be in other people's roadmap as well). We may have a better chance at a sane UX by trying for nicer shorthand syntax in level 4, to paper over the mess that these various properties are in general, not limited to this question.

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

Received on Monday, 26 March 2018 07:56:23 UTC