W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2016

[csswg-drafts] [css-values] # is easy to confuse with *

From: Simon Sapin via GitHub <sysbot+gh@w3.org>
Date: Thu, 04 Aug 2016 16:16:52 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-169414402-1470327411-sysbot+gh@w3.org>
SimonSapin has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-values] # is easy to confuse with * ==
https://drafts.csswg.org/css-values/#mult-comma introduces for 
grammars a `#` repetition which is like `*` but with comma separators.
 Terse grammars are nice, but in this case in this case this important
 difference seems easy to miss.

A couple times now I’ve reviewed a pull request from someone (not 
necessarily a new contributor) implementing CSS parsing from grammar 
in a spec like https://drafts.csswg.org/css-shapes-1/#funcdef-polygon 
. They do write a loop but don’t seem to realize that commas are 
required.

(Servo’s doesn’t use a parser generator for CSS. It’s manually-written
 recursive descent with one function or method for roughly each 
grammar term.)

In some specs (not css-shapes, which may be a bug) the `#` itself is a
 link to its definition in css-values, but even that is easy to miss.

I don’t know what to do about this, but it seems to be a recurring 
issue.

CC @tabatkins 

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/381 using your GitHub 
account
Received on Thursday, 4 August 2016 16:17:03 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:22 UTC