W3C home > Mailing lists > Public > public-fxtf-archive@w3.org > November 2018

[fxtf-drafts] [css-transforms-2] Serialize `scale` if we only use one number

From: Boris via GitHub <sysbot+gh@w3.org>
Date: Fri, 02 Nov 2018 20:36:40 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issues.opened-376959237-1541190997-sysbot+gh@w3.org>
BorisChiou has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [css-transforms-2] Serialize `scale` if we only use one number ==
The spec, [css-transforms-2] doesn't mention how to serialize the individual transforms. This may be fine but still not clear to me for the case:
div { 
  scale: 2;
console.log(window.getComputedStyle(div).scale); // serialize as "2" or "2 2"?
If only the X value is given, the Y value defaults to the same value, and If one or two values are given, this specifies a 2d scaling, equivalent to the `scale()` function (i.e. scale(2, 2) in the above example). However, should we serialize it as "2" or "2 2"? For now, Chrome serializes this as "2 2", but Firefox serializes this as "2", so I think this is an ambiguous part. Maybe the shorter one is preferred?

[1] https://drafts.csswg.org/css-transforms-2/#propdef-rotate

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/313 using your GitHub account
Received on Friday, 2 November 2018 20:36:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:50:24 UTC