Skip to content

Commit 64f3294

Browse files
committed
[css-text] Clarify effect of line-break:anywhere on white space
Closes w3c#3561
1 parent 9fa180a commit 64f3294

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

css-text-3/Overview.bs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ Text Processing</h3>
813813
</wpt>
814814
</dl>
815815

816-
<p>White space that was not removed or collapsed due to white space processing
816+
<p>[=White space=] that was not removed or collapsed due to white space processing
817817
is called <dfn local-lt="preserved">preserved white space</dfn>.
818818
In general, <a>preserved white space</a> is measured when calculating
819819
the intrinsic sizes ([=min-content size=] and [=max-content size=]) of text;
@@ -2408,7 +2408,7 @@ Line Breaking Details</h3>
24082408
rules.</dd>
24092409
<dt><dfn>anywhere</dfn></dt>
24102410
<dd>There is a <a>soft wrap opportunity</a> around every <a>typographic character unit</a>,
2411-
including around any punctuation character or preserved spaces,
2411+
including around any punctuation character or [=preserved white spaces=],
24122412
or in the middle of words,
24132413
disregarding any prohibition against line breaks,
24142414
even those introduced by characters with the GL, WJ, or ZWJ character class (see [[UAX14]])
@@ -2422,6 +2422,20 @@ Line Breaking Details</h3>
24222422
</wpt>
24232423

24242424
Note: This value triggers the line breaking rules typically seen in terminals.</dd>
2425+
2426+
<div class=note>
2427+
Note: ''line-break/anywhere'' only allows [=preserved white spaces=] at the end of the line
2428+
to be wrapped to the next line when 'white-space' is set to ''white-space/break-spaces'',
2429+
because in other cases:
2430+
* [=preserved white space=] at the end/start of the line is discarded (''white-space/normal'', ''white-space/pre-line'')
2431+
* wrapping is forbidden altoghether (''nowrap'', ''pre'')
2432+
* the spaces [=hang=] (''pre-wrap'').
2433+
2434+
When it does have an effect on [=preserved white space=],
2435+
with ''white-space: break-spaces'',
2436+
it allows breaking before the first space of a sequence,
2437+
which ''break-spaces'' on its own does not.
2438+
</div>
24252439
</dl>
24262440

24272441
<p class="feedback issue">

0 commit comments

Comments
 (0)