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

Re: [csswg-drafts] [css-values] Add <number-optional-number> type

From: Nikos Andronikos via GitHub <sysbot+gh@w3.org>
Date: Wed, 17 Aug 2016 06:14:39 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-240322733-1471414477-sysbot+gh@w3.org>
`<number-optional-number>` is a list with minimum one, and maximum two
 items.
Maybe I'm missing something, but those proposed options would allow 
more than two wouldn't they?

Expressing comma-wsp is the problematic part, since there's no 
equivalent that allows either comma or whitespace.

The clearest equivalent currently seems to be
`<number>{1,2} | <number>#{1,2}`

I think this might be what @fantasai is suggesting, but maybe we could
 make a new token for a comma-wsp list? E.g. '&'
This would result in:
`<number>&{1,2}`

This would improve the `<T>+#` grammars we have in SVG, which while 
correct, aren't as clear semantically as they could be.


-- 
GitHub Notification of comment by nikosandronikos
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/385#issuecomment-240322733 
using your GitHub account
Received on Wednesday, 17 August 2016 06:14:45 UTC

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