[CSS21] Editorial comment for 4.2, unexpected end of string

Somebody (I got the comment second-hand, so I don't know who) was 
bothered by an inconsistency in two of the examples in section 4.2[1].

The example under "Malformed declarations" states that

    p { color:red;   color; color:green }

is equivalent to

    p { color:green }

The example under "Unexpected end of string" states that

    p {
        color: green;
        font-family: 'Courier New Times
        color: red;
        color: green;
    }

would be treated the same as:

    p { color: green; color: green; }

Both examples are correct. But in the first example, the syntactically 
valid but meaningless 'color: red' is omitted from the "equivalent" 
rule; while in the second example, the equally valid and 
meaningless 'color: green' is present in the "treated the same" rule.

I can see how the examples can confuse people who expected the section 
to define some sort of normalization algorithm for CSS style sheets. We 
can maybe try to add more examples in the CSS3 Syntax module to avoid 
that expectation. But every change to the text of CSS 2.1 risks 
introducing new errors and delays.

So I propose we don't change CSS 2.1.


[1] http://www.w3.org/TR/CSS21/syndata.html#parsing-errors



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Monday, 17 March 2008 14:14:17 UTC