Description
Just a follow-up question of this issue. The new update 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, could we make it simpler?
[1] https://drafts.csswg.org/css-transforms-2/#individual-transform-serialization