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

RE: [css-values] Comments on Serialization of calc

From: Francois Remy <frremy@microsoft.com>
Date: Thu, 10 Mar 2016 21:42:09 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: CSS WG <www-style@w3.org>
Message-ID: <BN3PR0301MB0883E336319975D12BD5561ED6B40@BN3PR0301MB0883.namprd03.prod.outlook.com>
> > It is also not clear to me what happens if we have calc(1cm + 1mm) vs
> calc(1mm + 1cm). The units are compatible, but which one should we keep?
> 
> fantasai just pointed out that this is handled by CSSOM.  As far as
> calc() is concerned they just combine together into a "<length> value", and
> CSSOM describes how to serialize length values (as px).
> Same for other units, like calc(1deg + 1rad).

Perfect. I think we should reference that instead of making up a new term here, though.

So, maybe we can say only identical units should be merged, because serialization is already going to take care of the process of converting them to the same unit, right?

 
> > Does order matter?
> 
> Order doesn't matter in combining, but it does in serializing, and that's well-
> defined (alphabetical, with numbers first and percentages last).

Makes sense, given your comment above. 
Received on Thursday, 10 March 2016 21:42:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:01 UTC