Skip to content

[css-text] Hanging/collapsing of fixed-width spaces not specified #3879

@briansmith

Description

@briansmith

https://www.w3.org/TR/css-text-3/#white-space-rules says "White space processing in CSS affects only the document white space characters: spaces (U+0020), tabs (U+0009), and segment breaks."

However, it is often/usually desirable for the collapsing/hanging behavior to apply to fixed-width spaces when the fixed-width space would cause a line break. Consider:

<p>1&#x205f;+&#x205f;1&#x2005;=&#x2005;2</p>

Which renders as:

1 + 1 = 2

The spaces on either side of the + are U+205F Medium Mathematical Space and the spaces on either side of the = are U+2005. (This is the spacing recommended in http://www.unicode.org/notes/tn28 for these operators.)

Lines wrap at fixed-width spaces already (at least in the browsers I tested). However, in the browsers I tested, these fixed-width spaces do not currently collapse or hang at the end of a line like U+0020. Either collapsing/hanging of these spaces like U+0020 should be the default behavior, or there should be some way to opt into them being treated like U+0020 for the purposes of collapsing/hanging.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions