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

Re: [CSS3 Values] referencing width or height explicitly

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 19 Aug 2011 12:49:45 -0700
Message-ID: <CAAWBYDBkWWwFFJyF3jexcpwe_QhW-Z7GqFOrB6OP6npoXnOCBQ@mail.gmail.com>
To: Brian Manthos <brianman@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Fri, Aug 19, 2011 at 12:44 PM, Brian Manthos <brianman@microsoft.com> wrote:
> #3.At "/":
> # check: right side is "number"
> # return: the type of the left side
>
> This seems arbitrary to me.
>
> Why should "calc(5px * (8px / 4px))" get rejected at parse time rather than evaluate to 10px?

So we can detect division by zero at parse-time.  Otherwise, something like:

calc( 5px / (10px - 10%) )

...is valid or not based on the element's current width.

~TJ
Received on Friday, 19 August 2011 19:50:34 GMT

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