Skip to content

Commit 266d178

Browse files
committed
[css2] Rewrote sentence about syntax of identifiers to refer to identifiers
and not just to parts of selectors. Added third role of backslash: hide newline. --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401083
1 parent a766fa5 commit 266d178

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

css2/syndata.src

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: syndata.src,v 2.25 1998-02-24 00:56:03 ijacobs Exp $ -->
3+
<!-- $Id: syndata.src,v 2.26 1998-02-24 08:07:37 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>CSS2 syntax and basic data types</TITLE>
@@ -44,7 +44,7 @@ in case of multiple matches, the longest match determines the token.
4444
<TR><TD>PERCENTAGE <TD><code><var>{num}</var>%</code>
4545
<TR><TD>DIMENSION <TD><code><var>{num}{ident}</var></code>
4646
<TR><TD>URI <TD><code>url\(<var>{w}{string}{w}</var>\)<br>
47-
|url\(<var>{w}</var>([!#$%&amp;*-~]|{nonascii}|{escape})*<var>{w}</var>\)</code>
47+
|url\(<var>{w}</var>([!#$%&amp;*-~]|<var>{nonascii}</var>|<var>{escape}</var>)*<var>{w}</var>\)</code>
4848
<TR><TD>UNICODE-RANGE <TD><code>U\+[0-9A-F?]{1,6}(-[0-9A-F]{1,6})?</code>
4949
<TR><TD>CDO <TD><code>\&lt;!--</code>
5050
<TR><TD>CDC <TD><code>--&gt;</code>
@@ -57,7 +57,7 @@ in case of multiple matches, the longest match determines the token.
5757
<TR><TD>] <TD><code>\]</code>
5858
<TR><TD>S <TD><code>[ \t\r\n\f]+</code>
5959
<TR><TD>COMMENT <TD><code>\/\*[^*]*\*+([^/][^*]*\*+)*\/</code>
60-
<TR><TD>FUNCTION <TD><code>{ident}\(</code>
60+
<TR><TD>FUNCTION <TD><code><var>{ident}</var>\(</code>
6161
<TR><TD>INCLUDES <TD><code>~=</code>
6262
<TR><TD>DASHMATCH <TD><code>|=</code>
6363
<TR><TD>DELIM <TD><var>any other character</var>
@@ -74,7 +74,7 @@ in case of multiple matches, the longest match determines the token.
7474
<TR><TD>nmstart <TD><code>[a-zA-Z]|<var>{nonascii}</var>|<var>{escape}</var></code>
7575
<TR><TD>nonascii<TD><code>[^\0-\4177777]</code>
7676
<TR><TD>unicode <TD><code>\\[0-9a-f]{1,6}[ \n\r\t\f]?</code>
77-
<TR><TD>escape <TD><code>{unicode}|\\[ -~\200-\4177777]</code>
77+
<TR><TD>escape <TD><code><var>{unicode}</var>|\\[ -~\200-\4177777]</code>
7878
<TR><TD>nmchar <TD><code>[a-z0-9-]|<var>{nonascii}</var>|<var>{escape}</var></code>
7979
<TR><TD>num <TD><code>[0-9]+|[0-9]*\.[0-9]+</code>
8080
<TR><TD>string <TD><code><var>{string1}</var>|<var>{string2}</var></code>
@@ -98,7 +98,7 @@ property : IDENT S*;
9898
value : [ any | block | ATKEYWORD S* ]+;
9999
any : [ IDENT | NUMBER | PERCENTAGE | DIMENSION | STRING
100100
| DELIM | URI | HASH | UNICODE-RANGE | INCLUDES
101-
| '(' any* ')' | '[' any* ']' ] S*;
101+
| DASHMATCH | '(' any* ')' | '[' any* ']' ] S*;
102102
</PRE>
103103

104104
<P><a name="whitespace">COMMENT</a> tokens do not occur
@@ -141,29 +141,34 @@ serif, red, etc.) must not be quoted in a rule.
141141
particular that element names are case-insensitive in HTML, but
142142
case-sensitive in XML.
143143

144-
<LI> In CSS2, <a href="selector.html">selectors</a> (element
145-
names, classes and IDs) can contain only the characters
144+
<LI> In CSS2, identifiers (including element names, classes and
145+
IDs in <a href="selector.html">selectors</a>) can contain only
146+
the characters
146147
[A-Za-z0-9] and ISO 10646 characters 161 and
147148
higher, plus the hyphen (-); they cannot start with a hyphen or a
148149
digit. They can also contain escaped characters and any ISO 10646
149-
character as a numeric code (see next item).
150+
character as a numeric code (see next item).
150151

151152
<P>Note that Unicode is code-by-code equivalent to ISO 10646 (see
152153
[[UNICODE]] and [[ISO10646]]).
153154

154-
<LI> In CSS2, a backslash (\) character indicates two types of
155+
<LI> In CSS2, a backslash (\) character indicates three types of
155156
<span class="index-def" title="backslash escapes">
156157
<a name="escaped-characters">character escape</a></span>.
157158

158-
<P>First, it cancels the meaning of special CSS characters.
159+
<P>First, inside a <a href="#strings">string</a>, a backslash
160+
followed by a newline is ignored (i.e., the string is deemed not
161+
to contain either the backslash or the newline).
162+
163+
<P>Second, it cancels the meaning of special CSS characters.
159164
Any character (except a hexadecimal digit) can be escaped
160165
with a backslash to remove its special meaning.
161166
For example, <samp>"\""</samp> is a string consisting of one
162167
double quote. Style sheet preprocessors must not remove
163168
these backslashes from a style sheet since that would
164169
change the style sheet's meaning.
165170

166-
<P>Second, backslash escapes allow authors to refer to characters
171+
<P>Third, backslash escapes allow authors to refer to characters
167172
they can't easily put in a document. In this case, the backslash
168173
is followed by at most six hexadecimal digits (0..9A..F), which
169174
stand for the ISO 10646 (<a rel="biblioentry"

0 commit comments

Comments
 (0)