Skip to content

Commit 586cae9

Browse files
committed
[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 w3c#2500 w3c#3879 w3c#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.
1 parent 7c7557a commit 586cae9

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

css-text-3/Overview.bs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -803,10 +803,13 @@ Text Processing</h3>
803803
<dt><dfn>break-spaces</dfn></dt>
804804
<dd>The behavior is identical to that of ''white-space/pre-wrap'',
805805
except that:
806-
* Any sequence of <a>preserved</a> [=white space=] always takes up space,
806+
* Any sequence of <a>preserved</a> [=white space=]
807+
or [=other space separators=]
808+
always takes up space,
807809
including at the end of the line.
808-
* A line breaking opportunity exists after every <a>preserved</a> <a>white space</a> character,
809-
including between [=white space characters=].
810+
* A line breaking opportunity exists after every <a>preserved</a> <a>white space</a> character
811+
and after every [=other space separators=],
812+
including between adjacent onces.
810813

811814
<wpt>
812815
overflow-wrap/overflow-wrap-break-word-002.html
@@ -847,7 +850,9 @@ Text Processing</h3>
847850
white-space/break-spaces-tab-006.html
848851
</wpt>
849852

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

@@ -906,7 +911,8 @@ Text Processing</h3>
906911
<th>New Lines</th>
907912
<th>Spaces and Tabs</th>
908913
<th>Text Wrapping</th>
909-
<th>End-of-line spaces</th>
914+
<th>End-of-line [=spaces=]</th>
915+
<th>End-of-line [=other space separators=]</th>
910916
</tr>
911917
</thead>
912918
<tbody>
@@ -916,41 +922,47 @@ Text Processing</h3>
916922
<td>Collapse</td>
917923
<td>Wrap</td>
918924
<td>Remove</td>
925+
<td>Hang</td>
919926
</tr>
920927
<tr>
921928
<th>''pre''</th>
922929
<td>Preserve</td>
923930
<td>Preserve</td>
924931
<td>No wrap</td>
925932
<td>Preserve</td>
933+
<td>No wrap</td>
926934
</tr>
927935
<tr>
928936
<th>''nowrap''</th>
929937
<td>Collapse</td>
930938
<td>Collapse</td>
931939
<td>No wrap</td>
932940
<td>Remove</td>
941+
<td>Hang</td>
933942
</tr>
934943
<tr>
935944
<th>''pre-wrap''</th>
936945
<td>Preserve</td>
937946
<td>Preserve</td>
938947
<td>Wrap</td>
939948
<td>Hang</td>
949+
<td>Hang</td>
940950
</tr>
941951
<tr>
942952
<th>''break-spaces''</th>
943953
<td>Preserve</td>
944954
<td>Preserve</td>
945955
<td>Wrap</td>
946956
<td>Wrap</td>
957+
<td>Wrap</td>
947958
</tr>
948959
<tr>
949960
<th>''pre-line''</th>
950961
<td>Preserve</td>
951962
<td>Collapse</td>
952963
<td>Wrap</td>
953964
<td>Remove</td>
965+
<td>Hang</td>
954966
</tbody>
955967
</table>
956968

0 commit comments

Comments
 (0)