W3C home > Mailing lists > Public > www-style@w3.org > August 2011

[css3-values] CSSOM for calc()

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 1 Aug 2011 17:06:15 -0700
Message-ID: <CAAWBYDBerKryOLMaq7kLsgigd12JbG=GBOLCvY6GhyUO0Xg4FQ@mail.gmail.com>
To: www-style list <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:43 GMT