[csswg-drafts] [css-inline-3] initial-letters-wrap: first, whitespace collapse needs defining (#5120)

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

== [css-inline-3] initial-letters-wrap: first, whitespace collapse needs defining ==
See https://drafts.csswg.org/css-inline-3/#example-8c68c539

```html
<style>
p::first-letter {
    initial-letters: 3 3;
    initial-letters-wrap: first;
}
</style>
<p>A bout of illness...</p>
```

In the example shown above, the visual effect is that the "b" of "bout" is left aligned to the right edge of the initial-letters box. The whitespace preceding "bout" is discarded.

This appears to be by design (@dauwhe can perhaps confirm one way or another). But what is the mechanism for this whitespace collapse? Does it collapse when `white-space: pre`? Do we collapse just one space, or many? Is it all characters of class Zs?

I am leaning towards collapse all Zs, all the time in this case. I could imagine `white-space` other than normal might be used for poetry layout, for example, but even then it seems likely the word following the initial letter has to be aligned with the box. If more control is desired, authors have `shape-margin`.

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

Received on Wednesday, 27 May 2020 10:09:30 UTC