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

Re: [css3-values] multiplying and dividing complex units in calc?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 8 Mar 2012 11:13:39 -0800
Message-ID: <CAAWBYDBYeYv8GtHCkh1pv5ezqOjP5L+Jz6q2ztZRZtz+pXjKcQ@mail.gmail.com>
To: Chris Eppstein <chris@eppsteins.net>
Cc: www-style@w3.org
On Mar 8, 2012 11:38 AM, "Chris Eppstein" <chris@eppsteins.net> wrote:
> Based on the spec I can't discern whether the following will work as
> calc(20px / 1s * 20s) => 400px
> I'm concerned about this because storing ratios as intermediate values in
variables is incredibly useful. So once we have variables I'd like to be
able to store `calc(20px / 1s)` into a variable and then use that in
multiplication and division to translate between two otherwise unrelated

We don't have this yet; unit algebra means you can run into division by
zero that can't be detected until computed or used value time, so it's too
late to treat as a syntax error.

We plan to revisit this in the next level, though.

Received on Thursday, 8 March 2012 19:14:07 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:56 UTC