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

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