[csswg-drafts] [css-text-3] Segment Break Transformation Rules and U+200B (#4259)

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

== [css-text-3] Segment Break Transformation Rules and U+200B ==
The [Segment Break Transformation Rules](https://drafts.csswg.org/css-text-3/#line-break-transform) says this:
> If the character immediately before or immediately after the segment break is the zero-width space character (U+200B), then the break is removed, leaving behind the zero-width space. 

It means that
```
aaaa​
bbbb
```
is rendered as if it were
```
aaaa​bbbb
```

I like it, but:
* If there is an inline box boundary between the U+200B and the segment break, does it still count as "immediately before or immediately after" or not? Since inline box boundaries are not meant to affect text layout, I'd say no, but I don't know for sure that this is what the spec means. In other words, does
    ```
    aaaa<span>&#x200b;</span>
    bbbb
    ```
    get rendered as if it were
    ```
    aaaa<span>&#x200b;</span>bbbb
    ```
    or
    ```
    aaaa<span>&#x200b;</span> bbbb
    ```
* Assuming inline boundaries don't make a difference (otherwise the point is moot), does the display value of the U+200B matter? Obviously, if it has a display value that makes it not inline, then it does, but what if it's display none? In other words, does
    ```
    aaaa<span style=display:none>&#x200b;</span>
    bbbb
    ```
    get rendered as if it were
    ```
    aaaabbbb
    ```
    or
    ```
    aaaa bbbb
    ```

I'd propose clarifying the sentence to:
> If the character immediately before or immediately after (ignoring any intervening inline box boundaries) the segment break is the zero-width space character (U+200B) and the computed value of the 'display' property on that character is not ''none'', then the break is removed, leaving behind the zero-width space. 

I suppose the alternative would be to consider that this operation works on the element tree rather than the box tree, but that seems weird.

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

Received on Saturday, 31 August 2019 07:33:24 UTC