Skip to content

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

Closed
@faceless2

Description

@faceless2

See https://drafts.csswg.org/css-inline-3/#example-8c68c539

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions