W3C home > Mailing lists > Public > www-style@w3.org > April 2014

Re: [css-values] Concrete proposal for unit algebra in calc()

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 23 Apr 2014 17:48:58 -0700
Message-ID: <CAAWBYDDjOVLLc0k1FHc+87CAoSi_BjZx1qiwQNfdiTMLmjtCJw@mail.gmail.com>
To: Zack Weinberg <zackw@panix.com>
Cc: www-style list <www-style@w3.org>
On Wed, Apr 23, 2014 at 5:08 PM, Zack Weinberg <zackw@panix.com> wrote:
> But it is then also necessary to decide on the behavior of -Inf and
> NaN as the final result.  -Inf logically becomes the most negative
> allowed value (which in many cases will be 0), but I'm going to
> suggest that NaN be treated as *positive* infinity to raise the odds
> that someone will notice the math error.

Treating NaN as +Inf was my thought as well.

>> * We'll allow unit powers other than 1/0/-1.
>
> So, calc(1px * 2px / 3px) is valid then?  That's probably most
> convenient for authors.

Yup.

> Also, given what Matt Rakow said earlier today, I think the inverse
> length stuff should be dropped.

Yeah, makes sense.  The <time>/<frequency> stuff should be kept, though.

~TJ
Received on Thursday, 24 April 2014 00:49:46 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:39 UTC