Skip to content

[css-text] How to handle leading ideographic space sequences ? #4180

@javifernandez

Description

@javifernandez

I'm not sure whether the spec covers some extreme cases related to full-width spaces, specifically ideographich spaces (x3000).

As far as I know, leading ideographich space sequences should not be collapsed, even when the white-space property allows to do so (normal, nowrap, or pre-line). However, I'm not sure what to do in cases like this one:

<div width: 2em; white-space:normal">&#x3000;&#x3000;XX</div>

First of all, 'white-space: normal' allows wrapping, as it's stated in the spec:

Lines may wrap at allowed soft wrap opportunities, as determined by the line-breaking rules in effect, in order to minimize inline-axis overflow.

The Phase II: Trimming and Positioning section describes several scenarios and steps to evaluate, but I don't know which one this cases should be applied to:

1- A sequence of collapsible spaces at the beginning of a line (ignoring any intervening inline box boundaries) is removed.

In this case, these are full-width spaces, so they can not be considered as collapsible, despite the value of the white-space property (normal).

3- A sequence at the end of a line (ignoring any intervening inline box boundaries) of collapsible spaces (U+0020) and/or other space separators whose white-space value collapses spaces is removed.

If we allow breaking after the last U+3000 space, the space sequence will fill the whole line. Should we apply this step and remove the sequence ? In that case, it'd be the same than applying the step 1, which I think is not what we want for ideographic spaces.

So, I wonder which of the following results would be the expected one, according to the current specs, for this case:

Result 1Result 2Result 3

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions