Re: [CSS2.1] blocks with missing end bracket and parsing error

On 26/03/2011 1:55 PM, Boris Zbarsky wrote:
> On 3/25/11 10:31 PM, Alan Gresley wrote:
>> I have a simpler test cases that shows the same behavior.
>>
>> <http://css-class.com/test/css21testsuite/blocks-036.xht>
>
> The right behavior here is two red backgrounds.
>
> -Boris


Thank you Boriz. I have updated the two test cases.

<http://css-class.com/test/css21testsuite/blocks-031.xht>

<http://css-class.com/test/css21testsuite/blocks-036.xht>


This raises issues regarding the rules for handling parsing errors [1].


   Unexpected end of style sheet:

    | User agents must close all open constructs (for example: blocks,
    | parentheses, brackets, rules, strings, and comments) at the end
    | of the style sheet.


   The examples:

   @media screen {
     p:before { content: 'Hello

    would be treated the same as:

   @media screen {
     p:before { content: 'Hello'; }
   }


Are we saying that this CSS,


    [
    p { background: orange }
    p { background: red }


should be treated the same as this.


    [
    p { background: orange }
    p { background: red }
    ]



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


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Saturday, 26 March 2011 07:31:43 UTC