W3C home > Mailing lists > Public > public-houdini-archive@w3.org > March 2017

[css-houdini-drafts] [css-typed-om] Why don't the transform constructors/attributes accept CSSUnitValues?

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Tue, 07 Mar 2017 23:59:02 +0000
To: public-houdini-archive@w3.org
Message-ID: <issues.opened-212597191-1488931141-sysbot+gh@w3.org>
tabatkins has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-typed-om] Why don't the transform constructors/attributes accept CSSUnitValues? ==
The CSSRotation.x/y/z and CSSScale.x/y/z attributes are typed as `double`, presumably because the arguments are typed as `<number>` in CSS. But we don't generally represent `<number>`s as doubles in the TypedOM; they're CSSUnitValues with `{unit: "number"}`.

Is there a particular reason we're using doubles here, or should we switch to CSSNumericValue?  Or maybe `(double or CSSNumericValue)`, in both the constructors and the attribute setters?  (Whatever we do, we're setting precedent for all future interfaces representing `<number>` values.)

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/365 using your GitHub account
Received on Tuesday, 7 March 2017 23:59:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 24 October 2017 12:26:08 UTC