Skip to content

Commit 4cf0433

Browse files
committed
[css-text-3] Count trailing spaces for max-content but not min-content, use allow-end rather than force-end hanging rules. #3440 (comment)
1 parent 7ac3b16 commit 4cf0433

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

css-text-3/Overview.bs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,9 @@ Text Processing</h3>
743743
white-space/tab-stop-threshold-006.html
744744
</wpt>
745745

746-
As preserved spaces take up space and do not hang,
747-
they affect the box's intrinsic sizes ([=min-content size=] and [=max-content size=]).
746+
Such preserved spaces take up space and do not hang,
747+
and thus affect the box's intrinsic sizes
748+
([=min-content size=] and [=max-content size=]).
748749

749750
<wpt>
750751
white-space/white-space-intrinsic-size-001.html
@@ -754,6 +755,7 @@ Text Processing</h3>
754755
<p class="note">Note: This value does not guarantee that there will never be any overflow due to spaces:
755756
for example, if the line length is so short that even a single space does not fit,
756757
overflow is unavoidable.</p>
758+
757759
<dt><dfn>pre-line</dfn></dt>
758760
<dd>Like ''white-space/normal'', this value collapses consecutive spaces and allows wrapping,
759761
but preserves <a>segment breaks</a> in the source as <a>forced line breaks</a>.
@@ -777,6 +779,17 @@ Text Processing</h3>
777779
</wpt>
778780
</dl>
779781

782+
<p>White space that was not removed or collapsed due to white space processing
783+
is called <dfn local-lt="preserved">preserved white space</dfn>.
784+
In general, <a>preserved white space</a> is measured when calculating
785+
the <a>intrinsic sizes</a> of text;
786+
however <a>preserved white space</a>
787+
that would be allowed to <a>hang</a> at the end of the line
788+
(i.e. that preserved by ''pre-wrap'')
789+
is excluded--
790+
that is, considered to <a>hang</a>--
791+
when calculating <a>min-content sizes</a> and any sizes derived thereof.
792+
780793
<p>The following informative table summarizes the behavior of various
781794
'white-space' values:</p>
782795

@@ -819,7 +832,7 @@ Text Processing</h3>
819832
<td>Preserve</td>
820833
<td>Preserve</td>
821834
<td>Wrap</td>
822-
<td>Collapse or hang</td>
835+
<td>Hang</td>
823836
</tr>
824837
<tr>
825838
<th>''break-spaces''</th>
@@ -1441,7 +1454,8 @@ Text Processing</h3>
14411454
at the end of a line:
14421455
<ul>
14431456
<li>If 'white-space' is set to ''pre-wrap'',
1444-
the UA must <a>hang</a> this sequence.
1457+
the UA must <a>hang</a> this sequence
1458+
if it does not otherwise fit prior to justification.
14451459
It may also visually collapse the character advance widths
14461460
of any that would otherwise overflow.
14471461

@@ -1518,9 +1532,6 @@ Text Processing</h3>
15181532
</pre>
15191533
</div>
15201534

1521-
<p>White space that was not removed or collapsed during the white space
1522-
processing steps is called <dfn>preserved</dfn> white space.</p>
1523-
15241535
<h3 id="tab-size-property" caniuse="css3-tabsize" oldids="tab-size">
15251536
Tab Character Size: the 'tab-size' property</h3>
15261537

0 commit comments

Comments
 (0)