Re: [csswg-drafts] [css-text][css-sizing] When to/not to include preserved trailing spaces (#3440)

I've made two possible pull requests to close this bug:
* https://github.com/w3c/csswg-drafts/pull/3868 which strictly applies the resolution we took.
* https://github.com/w3c/csswg-drafts/pull/4095 which implements a variant: instead of requiring end-of-line preserved spaces to hang on lines with no forced breaks, and forbidding hanging to on lines with forced breaks, it requires end-of-line preserved spaces to hang on lines with no forced breaks, but allows (not forces) handing forbidding them to on lines with forced breaks.

In many cases, the result will be the same, but there are some subtle (and useful) differences:
* In https://github.com/w3c/csswg-drafts/pull/3868's example 6, the text is wrapped onto 3 lines. Current browsers don't do that. The equivalent situation shown in example 8 in https://github.com/w3c/csswg-drafts/pull/4095 keeps the text on two lines, matching what browsers have implemented.
* If https://github.com/w3c/csswg-drafts/pull/3868's example 6 was made editable, and the user placed the caret after the last space, and inserted an x, the rendering would change from
    ```
    |0_0|_
    |0_ |
    |0_ |
    ```
    to
    ```
    |0_0|_
    |0_0|_
    |x  |
    ```
    If instead we used the rules of https://github.com/w3c/csswg-drafts/pull/4095, we go from
    ```
    |0_0|_
    |0_0|_
    ```
    to
    ```
    |0_0|_
    |0_0|_
    |x  |
    ```
    which seems much preferable.

I'd like @fantasai and @kojiishi feedback on this.

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

Received on Tuesday, 9 July 2019 13:19:16 UTC