W3C home > Mailing lists > Public > www-style@w3.org > July 2013

Re: [css-syntax] string to number feedback

From: Zack Weinberg <zackw@panix.com>
Date: Sat, 20 Jul 2013 12:54:45 -0400
Message-ID: <CAKCAbMjqHxFqrJetc29vr3F2TRm+4UfOaVpdbLMF5EuiXhP5fg@mail.gmail.com>
To: marc@marcomorain.com
Cc: www-style list <www-style@w3.org>
On Sat, Jul 20, 2013 at 12:46 PM, Marc O'Morain <marc@marcomorain.com> 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.

zw
Received on Saturday, 20 July 2013 16:55:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC