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

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 UTC