Re: [css3-values] whitespace requirement around + and - in calc()

On 8/9/10 3:45 PM, Håkon Wium Lie wrote:
> Also sprach L. David Baron:
>
>   >
>   >  no longer has the requirement (which I believe used to be in the
>   >  spec, and which I believe the WG agreed on) that there must be
>   >  whitespace around the '+' and '-' inside of calc().
>   >
>   >  (This is needed because '-' is an identifier character in CSS, so
>   >  3em-2px tokenizes as a length with number '3' and unit 'em-2px'.)
>
> So, you'd like to change:
>
>    sum     : product [ [ "+" | "-" ] S* product ]*;
>
> to
>
>    sum     : product [ [ "+" | "-" ] product ]*;
>
> ?

No, I believe what's needed is a change to:

      sum     : product [ S+ [ "+" | "-" ] S+ product ]*;

-Boris

Received on Monday, 9 August 2010 19:51:02 UTC