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

[csswg-drafts] [css-transforms-2] Is it necessary to serialize all 3 parameters of translate given the 3rd component is 0px

From: Boris via GitHub <sysbot+gh@w3.org>
Date: Thu, 08 Nov 2018 19:04:47 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-378873826-1541703886-sysbot+gh@w3.org>
BorisChiou has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-transforms-2] Is it necessary to serialize all 3 parameters of translate given the 3rd component is 0px ==
Just a follow-up question of this [issue](https://github.com/w3c/fxtf-drafts/issues/313). The new updated of serialization of `translate` [1]:
- If a 2d translation is specified, the property must serialize with only one or two values (per usual, if the second value is 0px, the default, it must be omitted when serializing).
- If a 3d translation is specified, all three values must be serialized.

This question is only for the case: `translate: 100px 100px 0px` vs `translate: 100px 100px`. IIRC, it seems Gecko and Blink treat the `translate(x, y)` as `translate(x, y, 0)` while converting it into a matrix for computation. (Maybe it will simplify it if it only has 2d components.) Basically, 3d transformation is different from 2d transformation (by using different number of axes), so my question here is, what is the potential side-effects if we serialize `translate: 100px 100px 0px` as `translate: 100px 100px`? If the side-effects is not obvious in this case, why not make it simpler.

[1] https://drafts.csswg.org/css-transforms-2/#individual-transform-serialization

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3305 using your GitHub account
Received on Thursday, 8 November 2018 19:04:49 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:39 UTC