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: Thu, 24 Apr 2014 08:03:36 -0700
Message-ID: <CAAWBYDDR=k2KPX5th2haEU=+RKAMgi+5uAmguSBmQ_gnGxs6yQ@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: Zack Weinberg <zackw@panix.com>, www-style list <www-style@w3.org>
On Thu, Apr 24, 2014 at 5:21 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> On 24/04/2014 00:56, Tab Atkins Jr. wrote:
>> * We'll allow unit powers other than 1/0/-1.
>
> That’s only for intermediate expressions, right? The overall calc()
> expression still needs to have a single "base" unit, if only to type-check
> wherever it’s used.

Yes, the final unit has to be a recognized one.

(Though, note the slight complication that a calc() should probably be
allowed to resolve to a non-recognized unit *if it's nested inside
another calc()*, since "calc(1 + calc(2 + 3))" is basically identical
to "calc(1 + (2 + 3))".)

~TJ
Received on Thursday, 24 April 2014 15:04:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:21 UTC