Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[css-text] Clarify handling of other space separators in white-space dfn
The definition of the various values of the white-space property in
section 3 does not go into much detail about exactly how they work,
and just provides a high level intro to what they do. The details are
provided in section 4, and in particular 4.1 and 4.3 (so called
“phase 1” and “phase 2” of white space processing).

While this phase 2 has been updated (see
#2500
#3879
#4180)
to define that not only space characters, but also other space
separators hang / don't hang / wrap / don't wrap, etc, based on the
value of the white-space property, the high level definition of these
values was not updated to reflect that.

While this is not necessarily a bug, as it is already called out that
details are in section 4, apparent contradictions or omissions can be
confusing.

Therefore, in the part of these definitions that explicitly talked
about white space wrapping/hanging (or not), include other space
separators as well, as defined in 4.3.
  • Loading branch information
frivoal committed Oct 15, 2019
commit 586cae9762bded54162cc753ffa35bcf5aaf16c9
22 changes: 17 additions & 5 deletions css-text-3/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -803,10 +803,13 @@ Text Processing</h3>
<dt><dfn>break-spaces</dfn></dt>
<dd>The behavior is identical to that of ''white-space/pre-wrap'',
except that:
* Any sequence of <a>preserved</a> [=white space=] always takes up space,
* Any sequence of <a>preserved</a> [=white space=]
or [=other space separators=]
always takes up space,
including at the end of the line.
* A line breaking opportunity exists after every <a>preserved</a> <a>white space</a> character,
including between [=white space characters=].
* A line breaking opportunity exists after every <a>preserved</a> <a>white space</a> character
and after every [=other space separators=],
including between adjacent onces.

<wpt>
overflow-wrap/overflow-wrap-break-word-002.html
Expand Down Expand Up @@ -847,7 +850,9 @@ Text Processing</h3>
white-space/break-spaces-tab-006.html
</wpt>

Such [=preserved=] [=white space characters=] take up space and do not [=hang=],
Such [=preserved=] [=white space characters=]
and [=other space separators=]
take up space and do not [=hang=],
and thus affect the box's intrinsic sizes
([=min-content size=] and [=max-content size=]).

Expand Down Expand Up @@ -906,7 +911,8 @@ Text Processing</h3>
<th>New Lines</th>
<th>Spaces and Tabs</th>
<th>Text Wrapping</th>
<th>End-of-line spaces</th>
<th>End-of-line [=spaces=]</th>
<th>End-of-line [=other space separators=]</th>
</tr>
</thead>
<tbody>
Expand All @@ -916,41 +922,47 @@ Text Processing</h3>
<td>Collapse</td>
<td>Wrap</td>
<td>Remove</td>
<td>Hang</td>
</tr>
<tr>
<th>''pre''</th>
<td>Preserve</td>
<td>Preserve</td>
<td>No wrap</td>
<td>Preserve</td>
<td>No wrap</td>
</tr>
<tr>
<th>''nowrap''</th>
<td>Collapse</td>
<td>Collapse</td>
<td>No wrap</td>
<td>Remove</td>
<td>Hang</td>
</tr>
<tr>
<th>''pre-wrap''</th>
<td>Preserve</td>
<td>Preserve</td>
<td>Wrap</td>
<td>Hang</td>
<td>Hang</td>
</tr>
<tr>
<th>''break-spaces''</th>
<td>Preserve</td>
<td>Preserve</td>
<td>Wrap</td>
<td>Wrap</td>
<td>Wrap</td>
</tr>
<tr>
<th>''pre-line''</th>
<td>Preserve</td>
<td>Collapse</td>
<td>Wrap</td>
<td>Remove</td>
<td>Hang</td>
</tbody>
</table>

Expand Down