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

On Thu, Mar 10, 2016 at 1:42 PM, Francois Remy <> wrote:
>> > 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?

No, serialization won't automagically combine things, it just dictates
what unit to use when they *do* get serialized.  See my previous email
to David where I explored what impls do at specified-value time.


Received on Thursday, 10 March 2016 22:02:59 UTC