[css3-values] CSSOM for calc()

One of our engineers is working on calc() right now, and has some
questions about how the OM for calc() values should work.

1. Is it acceptable to collapse redundant subexpressions that can be
unified at parsetime?  For example, if the passed value was "calc(1px
+ 1px + 1px)", is it okay to simplify it to "calc(3px)" or even just
"3px"?  Is this okay at parse/computed/used value time?  What about
units that aren't identical, but are still convertible at parsetime,
like "calc(1in + 1px)"?

2. When exactly does calc() collapse to a normal value, in terms of
what we expose to authors?  I presume that getComputedValue() returns
a normalized value without any trace of calc(), since that generally
returns used values.  Is this correct?

(We haven't even started thinking about the object-based OM yet, but
there are some similar questions in that vein.)

~TJ

Received on Tuesday, 2 August 2011 00:07:02 UTC