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

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

From: Peter Moulder <pjrm@mail.internode.on.net>
Date: Thu, 17 Sep 2015 23:06:33 +1000
To: www-style@w3.org
Message-ID: <20150917130633.GA23122@mail.internode.on.net>
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

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