Re: [css-syntax] string to number feedback

On Sat, Jul 20, 2013 at 9:54 AM, Zack Weinberg <> wrote:
> On Sat, Jul 20, 2013 at 12:46 PM, Marc O'Morain <> wrote:
>>> {
>>>   width: 100%;
>>> }
>> This input would be accepted by the railroad diagrams (stylesheet =>
>> qualified rule => declaration list, bypassing the 'component value' in
>> the 'qualified rule' diagram). There should not be a route around the
>> 'component value' in 'qualified rule'.
> You may have tripped over the less-than-obvious distinction between
> grammar productions that accept valid CSS and grammar productions that
> arrange for predictable error recovery.  If I remember correctly, the
> example you show is indeed invalid, but error recovery is supposed to
> resynchronize at the close brace; in other words, if there were a
> valid rule immediately after the close brace, it would not be
> discarded.  The way Syntax 3 expresses this (or did the last time I
> looked at it anyway) is to say that this does match the qualified-rule
> production but then it's invalid because the selector is empty.

Syntax does not judge the validity of a qualified rule with an empty
prelude - it leaves that to the individual rule grammars.

But otherwise, yes, you're right - Syntax is concerned with producing
a stylesheet out of its input while honoring the error-recovery rules,
and the current algorithms do that exactly.  What a validator thinks
of the CSS is irrelevant to this purpose.


Received on Monday, 22 July 2013 16:24:58 UTC