W3C home > Mailing lists > Public > www-style@w3.org > September 2015

Re: [CSS22] Legality of: sel { ; foo:bar; ; }

From: Simon Sapin <simon.sapin@exyr.org>
Date: Thu, 17 Sep 2015 15:27:36 +0200
To: www-style@w3.org
Message-ID: <55FABFC8.2040009@exyr.org>
On 17/09/15 15:06, Peter Moulder wrote:
> The following recent change to css2/syndata:
>
>    -ruleset     : selector? '{' S* declaration? [ ';' S* declaration? ]* '}' S*;
>    +ruleset     : selector? '{' S* declaration-list '}' S*;
>    +declaration-list: declaration [ ';' S* declaration-list ]?
>    +              | at-rule declaration-list
>    +              | /* empty */;
>     ...
>     declaration : property S* ':' S* value;
>
> has the effect that leading semicolons and consecutive semicolons
> within a ruleset block no longer conform to the core grammar.
>
> Is this intentional?  It seems a bit late to be changing the
> conformance of so common an occurrence (e.g. due to commenting
> out a declaration), even if error recovery means it doesn't
> make a difference to web browser behaviour.  (It might also
> require re-examining css2 statement of error recovery behaviour
> for this case.)

This is not intentional. I think it can be fixed by replacing 
declaration with declaration? in the definition of declaration-list.

-- 
Simon Sapin
Received on Thursday, 17 September 2015 13:28:08 UTC

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