Re: [css-syntax] problem with consuming qualified rule

On Tue, Mar 4, 2014 at 2:04 PM, Johannes Koch <koch@w3development.de> wrote:
> Hi,
>
> 5.4.3. Consume a qualified rule
>
> Create a new qualified rule with its prelude initially set to an empty list,
> ...
>
> When coming from 5.3.3.
>
> 3. If the current input token is an <EOF-token>, return a syntax error.
>    ...
>    Otherwise, consume a qualified rule and let rule be the return
>    value. If nothing was returned, return a syntax error.
>
> I think, in step 3. the current input token has to be reconsumed before
> consuming a qualified rule.
>
> Then my remark in my mail 'problem with consume list of rules':
>> The same applies to 5.4.1
>> anything else
>>
>> also reconsuming the current input token before consuming a qualified >
>> rule.
>
> does not apply, leavin only the problem with the at-keyword rule

Fixed as part of my larger review, spurred by your earlier bug.

> and the
> puzzling CDO/CDC stuff.

Legacy stuff.  Way back in the day, when CSS was first being
implemented, legacy browsers didn't understand it and would just
output a <style> as an unknown element filled with a bunch of text.
JS already solved this in the <script> element by defining that <!--
and --> were additional ways to write line-comments, identical to
using //, so you could wrap your JS in them and legacy agents wouldn't
display the contents (since they thought it was commented out).

CSS did the same thing, so <!-- and --> are just ignored when they
show up at top-level between rules.

~TJ

Received on Tuesday, 4 March 2014 22:32:45 UTC