@@ -288,7 +288,7 @@ <H2 id=since-20110607><a name="q1">C.1 Changes since the Recommendation of 7 Jun
288288 < blockquote >
289289 < p > Boxes in the normal flow belong to a < a name ="x0 "> < span class ="index-def "
290290 title ="formatting context "> formatting context</ span > </ a > , which
291- < ins > in CSS 2.2 </ ins > may be < ins > table,</ ins > block or
291+ < ins > in CSS 2</ ins > may be < ins > table,</ ins > block or
292292 inline< del > , but not both simultaneously</ del > . < ins > In future
293293 levels of CSS, other types of formatting context will be
294294 introduced.</ ins > < a href ="#block-level "> Block-level</ a > boxes
@@ -787,7 +787,7 @@ <H2 id=since-20110607><a name="q1">C.1 Changes since the Recommendation of 7 Jun
787787
788788 < p > < del > Except for table boxes, which are described in a later
789789 chapter, and replaced elements,</ del > < ins > In
790- CSS 2.2 ,</ ins > a block-level box is also a block container
790+ CSS 2,</ ins > a block-level box is also a block container
791791 box < ins > unless it is a table box or the principal box of a
792792 replaced element</ ins > . A < dfn > block container box</ dfn > either
793793 contains only block-level boxes or establishes an inline
@@ -919,7 +919,7 @@ <H2 id=since-20110607><a name="q1">C.1 Changes since the Recommendation of 7 Jun
919919
920920 < p > < ins > However, if no boxes are generated for the element whose
921921 background would be used for the background of the canvas, then
922- the canvas background is transparent. (in CSS 2.2 , that is the
922+ the canvas background is transparent. (in CSS 2, that is the
923923 case when the element or an ancestor has 'display: none'.)</ ins >
924924
925925 < p > < ins > Note that, if the element has 'visibility: hidden' but
@@ -953,6 +953,105 @@ <H2 id=since-20110607><a name="q1">C.1 Changes since the Recommendation of 7 Jun
953953
954954
955955
956+
957+
958+ < li id =s.4.1.1e class =change >
959+ < p > < span class =updated > [2015-09-05]</ span > Malformed declarations
960+ are handled differently when the start of the malformed
961+ declaration conforms to the syntax of an at-rule. In that case,
962+ parsing resumes not at the next semicolon or at the closing curly
963+ brace of the enclosing block, but immediately after that
964+ at-rule. This is expressed by adding the at-rule to the core
965+ syntax for rulesets, as shown below.
966+
967+ < p > In < a href ="syndata.html#tokenization " > “4.1.1
968+ Tokenization”,</ a > change the production for ruleset as
969+ follows:
970+
971+ < blockquote >
972+ < pre >
973+ < del > ruleset : selector? '{' S* declaration? [ ';' S* declaration? ]* '}' S*;</ del >
974+ < ins > ruleset : selector? '{' S* declaration-list '}' S*;
975+ declaration-list: declaration [ ';' S* declaration-list ]?
976+ | at-rule declaration-list
977+ | /* empty */;</ ins > </ pre >
978+ </ blockquote >
979+
980+ < p > In < a href ="syndata.html#rule-sets " > “4.1.7 Rule sets,
981+ declaration blocks, and selectors”,</ a > change the second
982+ paragraph as follows:
983+
984+ < blockquote >
985+ < p > A declaration block starts with a left curly brace ({) and
986+ ends with the matching right curly brace (}). In between there
987+ must be a list of zero or more < del > semicolon-separated (;)
988+ declarations</ del > < ins > declarations and at-rules. Declarations
989+ must end with a semicolon (;) unless they are last in the
990+ list.</ ins >
991+
992+ < p class =note > < ins > Note: CSS level 2 has no at-rules that
993+ may appear inside rule sets, but such at-rules may be defined in
994+ future levels.</ ins >
995+ </ blockquote >
996+
997+ < p > In < a href ="syndata.html#parsing-errors " > “4.2 Rules for
998+ handling parsing errors”,</ a > change the rule for malformed
999+ declarations as follows:
1000+
1001+ < blockquote >
1002+ < ul >
1003+ < li >
1004+ < p > < strong > Malformed declarations.</ strong > User agents must
1005+ handle unexpected tokens encountered while parsing a
1006+ declaration by reading until the end of the declaration, while
1007+ observing the rules for matching pairs of (), [], {}, "", and
1008+ '', and correctly handling escapes. For example, a malformed
1009+ declaration may be missing a property name, colon (:), or
1010+ property value.
1011+
1012+ < p > < ins > When the UA expects the start of a declaration or
1013+ at-rule (i.e., an IDENT token or an ATKEYWORD token) but finds
1014+ an unexpected token instead, that token is considered to be
1015+ the first token of a malformed declaration. I.e., the rule for
1016+ malformed declarations, rather than malformed statements is
1017+ used to determine which tokens to ignore in that case.</ ins >
1018+
1019+ < p > The following are all equivalent:
1020+
1021+ < pre class =example >
1022+ < code > p { color:green }
1023+ < ins > p { @foo { bar: baz } color:green } /* unknown at-rule */</ ins >
1024+ p { color:green; color } /* malformed declaration missing ':', value */
1025+ p { color:red; color; color:green } /* same with expected recovery */
1026+ p { color:green; color: } /* malformed declaration missing value */
1027+ p { color:red; color:; color:green } /* same with expected recovery */
1028+ p { color:green; color{;color:maroon} } /* unexpected tokens { } */
1029+ p { color:red; color{;color:maroon}; color:green } /* same with recovery */</ code > </ pre >
1030+ </ li >
1031+ </ ul >
1032+ </ blockquote >
1033+
1034+ < p > And, finally, in < a href ="page.html#page-box " > “13.2 Page
1035+ boxes: the @page rule&rdquo,</ a > remove the following text, which
1036+ is now redundant:
1037+
1038+ < blockquote >
1039+ < p > < del > The rules for handling malformed declarations, malformed
1040+ statements, and invalid at-rules inside @page are as defined in
1041+ < a href ="syndata.html#parsing-errors " > section 4.2,</ a >
1042+ with the following addition: when the UA expects the start of a
1043+ declaration or at-rule (i.e., an IDENT token or an ATKEYWORD
1044+ token) but finds an unexpected token instead, that token is
1045+ considered to be the first token of a malformed
1046+ declaration. I.e., the rule for malformed declarations, rather
1047+ than malformed statements is used to determine which tokens to
1048+ ignore in that case.</ del >
1049+ </ blockquote >
1050+
1051+
1052+
1053+
1054+
9561055 </ ul >
9571056
9581057< hr class ="navbar ">
0 commit comments