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

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.)

pjrm.

Received on Thursday, 17 September 2015 13:07:05 UTC