W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css3-values] parenthesis preceded by a sign and the grammar of calc()

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 10 May 2012 15:35:09 +0200
Message-ID: <CAAWBYDA4svt736pOFjbFfPw6M2bB_HC1bhz=LePsTHqeHVX17g@mail.gmail.com>
To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
Cc: WWW Style <www-style@w3.org>
On Thu, May 10, 2012 at 10:44 AM, Kang-Hao (Kenny) Lu
<kennyluck@csail.mit.edu> wrote:
> Unless I am missing something, neither IE9 nor Firefox12 treat
> calc(+(1em)) as valid and therefore
>
>  # unit    :
>  # ["+"|"-"]? [ NUMBER | DIMENSION | PERCENTAGE | "(" S* sum S* ")" ];
>
> should read
>
>  | unit    :
>  | [ [["+"|"-"]? [ NUMBER | DIMENSION | PERCENTAGE ]] |
>  |   "(" S* sum S* ")" ];
>
> . Or do we want this to work?

That's not intended to work - it's definitely an accident.

With the change to the {number} production in 2.1, though, the correct
grammar would actually be:

unit :
  NUMBER | DIMENSION | PERCENTAGE | "(" S* sum S* ")";

~TJ
Received on Thursday, 10 May 2012 13:36:05 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:54 GMT