@@ -66,7 +66,8 @@ <h2 class="no-num no-toc no-ref" id=contents><span class=content>Table of conten
6666< div data-fill-with =table-of-contents > < ul class =toc > < li > < a href =#intro > < span class =secno > 1</ span >
6767Introduction</ a > < ul class =toc > < li > < a href =#placement > < span class =secno > 1.1</ span >
6868Module interactions</ a > </ ul > < li > < a href =#syntax-description > < span class =secno > 2</ span >
69- Description of CSS's Syntax</ a > < ul class =toc > < li > < a href =#error-handling > < span class =secno > 2.1</ span >
69+ Description of CSS's Syntax</ a > < ul class =toc > < li > < a href =#escaping > < span class =secno > 2.1</ span >
70+ Escaping</ a > < li > < a href =#error-handling > < span class =secno > 2.2</ span >
7071Error Handling</ a > </ ul > < li > < a href =#tokenizing-and-parsing-css > < span class =secno > 3</ span >
7172Tokenizing and Parsing CSS</ a > < ul class =toc > < li > < a href =#overview-of-the-parsing-model > < span class =secno > 3.1</ span >
7273Overview of the Parsing Model</ a > < li > < a href =#the-input-byte-stream > < span class =secno > 3.2</ span >
@@ -243,14 +244,41 @@ <h2 data-level=2 id=syntax-description><span class=secno>2 </span><span class=co
243244 and then can contain letters, numbers, hyphens, or underscores.
244245 You can include any character at all,
245246 even ones that CSS uses in its syntax,
246- by escaping it with a backslash (\) or by using a hexadecimal escape .
247+ by < a href = #escaping0 > escaping </ a > it .
247248
248249< p > The syntax of selectors is defined in the < a href =http://www.w3.org/TR/selectors/ > Selectors spec</ a > .
249250 Similarly, the syntax of the wide variety of CSS values is defined in the < a href =http://www.w3.org/TR/css3-values/ > Values & Units spec</ a > .
250251 The special syntaxes of individual < a href =#at-rule > at-rules</ a > can be found in the specs that define them.
251252
253+ < h3 data-level =2.1 id =escaping > < span class =secno > 2.1 </ span > < span class =content >
254+ Escaping</ span > < a class =section-link href =#escaping > §</ a > </ h3 >
252255
253- < h3 data-level =2.1 id =error-handling > < span class =secno > 2.1 </ span > < span class =content >
256+ < p > < em > This section is not normative.</ em >
257+
258+ < p > Any Unicode character can be included in an identifier or quoted string
259+ by < dfn data-dfn-type =link id =escaping0 > escaping</ dfn > it.
260+ CSS escape sequences start with a backslash (\), and continue with:
261+
262+ < p > < ul >
263+ < li >
264+ Any Unicode character that is not a < a href =#hex-digit > hex digits</ a > or a < a href =#newline > newline</ a > .
265+ The escape sequence is replaced by that character.
266+ < li >
267+ Or one to six < a href =#hex-digit > hex digits</ a > , followed by an optional < a href =#whitespace > whitespace</ a > .
268+ The escape sequence is replaced by the Unicode character
269+ whose codepoint number is given by the hexadecimal digits.
270+ This optional whitespace allow hexadecimal escape sequences
271+ to be followed by "real" hex digits.
272+
273+ < p class =example >
274+ An identifier with the value "&B"
275+ could be written as < span class =css data-autolink =maybe > \26 B</ span > or < span class =css data-autolink =maybe > \000026B</ span > .
276+
277+ < p class =note >
278+ A "real" space after the escape sequence must be doubled.
279+ </ ul >
280+
281+ < h3 data-level =2.2 id =error-handling > < span class =secno > 2.2 </ span > < span class =content >
254282Error Handling</ span > < a class =section-link href =#error-handling > §</ a > </ h3 >
255283
256284< p > < em > This section is not normative.</ em >
0 commit comments