W3C home > Mailing lists > Public > www-style@w3.org > August 2010

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 09 Aug 2010 15:50:27 -0400
Message-ID: <4C605C03.8010804@mit.edu>
To: Håkon Wium Lie <howcome@opera.com>
CC: "L. David Baron" <dbaron@dbaron.org>, www-style@w3.org
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 GMT

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