Skip to content

Commit 7e5d076

Browse files
committed
[css-text-3] Treat CR as spaces
Closes #5410
1 parent e082add commit 7e5d076

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

css-text-3/Overview.bs

+13-1
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,9 @@ Order of Operations</h4>
11901190

11911191
<p>
11921192
Control characters (<a>Unicode category</a> <code>Cc</code>)--
1193-
other than tabs (U+0009), line feeds (U+000A),
1193+
other than tabs (U+0009),
1194+
line feeds (U+000A),
1195+
carriage returns (U+000D)
11941196
and sequences that form a <a>segment break</a>--
11951197
must be rendered as a visible glyph
11961198
which the UA must synthethize if the glyphs found in the font are not visible,
@@ -1270,6 +1272,16 @@ Order of Operations</h4>
12701272
white-space/control-chars-09F.html
12711273
</wpt>
12721274

1275+
Carriage returns (U+000D) are treated identically to spaces (U+0020) in all respects.
1276+
1277+
Note: For HTML documents,
1278+
carriage returns present in the source code
1279+
are converted to line feeds at the parsing stage
1280+
and therefore do no appear as U+000D to CSS.
1281+
However, the character <em>is</em> preserved--
1282+
and the above rule observable--
1283+
when encoded using an escape sequence (<code class=lang-html>&amp;#x0d;</code>).
1284+
12731285
<h3 id="white-space-rules">
12741286
The White Space Processing Rules</h3>
12751287

css-text-3/test-coverage.html

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ <h2 id="white-space-processing-details">4 <a href="https://drafts.csswg.org/css-
133133

134134
<ul>
135135
<li>As required by [UNICODE], unsupported Default_ignorable characters must be ignored for rendering.
136+
<li>Carriage returns (U+000D) are treated identically to spaces (U+0020) in all respects.
136137
</ul>
137138

138139
<h3 id="the-white-space-processing-rules">4.1 <a href="https://drafts.csswg.org/css-text-3/#white-space-rules">The White Space Processing Rules</a></h3>

0 commit comments

Comments
 (0)