Skip to content

Commit c1e4f53

Browse files
committed
[css-text-3] Clarify behavior of preserved tabs at the end of the line
Closes #3869
1 parent 73d7635 commit c1e4f53

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

css-text-3/Overview.bs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,9 +1184,9 @@ Text Processing</h3>
11841184
<li><p>If 'white-space' is set to ''pre'', ''pre-wrap'', or ''break-spaces'',
11851185
any sequence of spaces is treated as a sequence of non-breaking spaces.
11861186
However, for ''pre-wrap'',
1187-
a <a>soft wrap opportunity</a> exists at the end of the sequence,
1187+
a <a>soft wrap opportunity</a> exists at the end of a sequence of spaces and/or tabs,
11881188
while for ''break-spaces'',
1189-
a <a>soft wrap opportunity</a> exists after every space.
1189+
a <a>soft wrap opportunity</a> exists after every space and every tab.
11901190
<wpt>
11911191
overflow-wrap/overflow-wrap-break-word-004.html
11921192
overflow-wrap/overflow-wrap-break-word-005.html
@@ -1540,8 +1540,9 @@ Text Processing</h3>
15401540
white-space-processing-046.xht
15411541
white-space-processing-047.xht
15421542
</wpt>
1543-
<li>If there remains any sequence of <a>white space</a>
1544-
and/or [=other space separators=]
1543+
<li>If there remains any sequence of <a>white space</a>,
1544+
[=other space separators=],
1545+
and/or tabs
15451546
at the end of a line:
15461547
<ul>
15471548
<li>If 'white-space' is set to ''pre-wrap'',
@@ -1584,7 +1585,7 @@ Text Processing</h3>
15841585
Note: [=Hanging=] the white space rather than collapsing it
15851586
allows users to see the space when selecting or editing text.
15861587
<li>If 'white-space' is set to ''break-spaces'',
1587-
[=hanging=] or collapsing the advance width of spaces
1588+
[=hanging=] or collapsing the advance width of the spaces or tabs
15881589
at the end of the line is not allowed;
15891590
those that overflow must <a>wrap</a> to the next line.
15901591

css-text-3/test-coverage.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,16 @@ <h3 id="the-white-space-processing-rules">4.1 <a href="https://drafts.csswg.org/
160160

161161
<h4 id="phase-i-collapsing-and-transformation">4.1.1 <a href="https://drafts.csswg.org/css-text-3/#white-space-phase-1">Phase I: Collapsing and Transformation</a></h4>
162162

163-
<p>Sufficient coverage. All parts of this section are well exercised.
163+
<p>Almost Sufficient coverage. Most parts of this section are well exercised.
164+
165+
<p>Missing tests:
166+
167+
<ul>
168+
<li>
169+
a soft wrap opportunity exists at the end of a sequence of spaces <strong>and/or tabs</strong>,
170+
while for break-spaces, soft wrap opportunity exists after every space <strong>and every tab</strong>.
171+
</ul>
172+
164173

165174
<h4 id="segment-break-transformation-rules">4.1.2 <a href="https://drafts.csswg.org/css-text-3/#line-break-transform">Segment Break Transformation Rules</a></h4>
166175

@@ -189,6 +198,7 @@ <h4 id="phase-ii-trimming-and-positioning">4.1.3 <a href="https://drafts.csswg.o
189198

190199
<ul>
191200
<li>See [UAX9] for rules on how U+0009 tabulation interacts with bidi.
201+
<li>tabs hang with ''pre-wrap'' and wrap with ''break-spaces''
192202
</ul>
193203

194204
<h3 id="tab-character-size-the-tab-size-property">4.2 <a href="https://drafts.csswg.org/css-text-3/#tab-size-property">Tab Character Size: the tab-size property</a></h3>

0 commit comments

Comments
 (0)