Skip to content

Commit 333d97c

Browse files
committed
[css2] Issues 24 and 85.
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402895
1 parent 43eceb9 commit 333d97c

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

css2/syndata.src

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
22
<html lang="en">
3-
<!-- $Id: syndata.src,v 2.164 2009-02-03 11:24:59 bbos Exp $ -->
3+
<!-- $Id: syndata.src,v 2.165 2009-04-15 07:24:39 bbos Exp $ -->
44
<head>
55
<title>Syntax and basic data types</title>
66
<meta name="editor" lang="tr" content="Tantek &Ccedil;elik">
@@ -271,7 +271,8 @@ href="#parsing-errors">rules for handling parsing errors</a>. However, because t
271271
</p>
272272
<p>Second, it cancels the meaning of special CSS characters.
273273
Except within CSS comments, any character (except a
274-
hexadecimal digit) can be escaped
274+
hexadecimal digit or a linefeed, carriage return of formfeed)
275+
can be escaped
275276
with a backslash to remove its special meaning.
276277
For example, <samp>"\""</samp> is a string consisting of one
277278
double quote. Style sheet preprocessors must not remove
@@ -666,6 +667,27 @@ p { color:red; color{;color:maroon}; color:green } /* same with recovery */
666667
</li>
667668

668669

670+
<li><strong>Malformed statements.</strong> User agents must handle
671+
unexpected tokens encountered while parsing a statement by reading
672+
until the end of the statement, while observing the rules for matching
673+
pairs of (), [], {}, "", and '', and correctly handling escapes. For
674+
example, a malformed statement may contain an unexpected closing brace
675+
or at-keyword. E.g., the following lines are all ignored:
676+
677+
<!-- An unexpected token when parsing the stylesheet production is
678+
considered to be the start of a (malformed) ruleset, which ends at
679+
the next balanced {} pair at top level. -->
680+
681+
<pre>
682+
p @here {color: red} /* ruleset with unexpected at-keyword "@here" */
683+
@foo @bar; /* at-rule with unexpected at-keyword "@bar" */
684+
}} {{ - }} /* ruleset with unexpected right brace */
685+
) ( {} ) p {color: red } /* ruleset with unexpected right parenthesis */
686+
</pre>
687+
688+
<!-- Note that the ") (" in the last line do not count as a balanced
689+
pair. -->
690+
669691
<li><strong>Invalid at-keywords.</strong> User agents must <span
670692
class="index-inst" title="ignore"><a href="#ignore">ignore</a></span>
671693
an invalid at-keyword together with everything following it, up to and

0 commit comments

Comments
 (0)