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

[fxtf-drafts] [css-transforms-2] Serialize the individual transform if the animation is at 0% and 100%

From: Boris via GitHub <sysbot+gh@w3.org>
Date: Tue, 06 Nov 2018 19:14:49 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issues.opened-377994083-1541531687-sysbot+gh@w3.org>
BorisChiou has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [css-transforms-2] Serialize the individual transform if the animation is at 0% and 100% ==
About the serialization of the interpolation result (for individual transforms), our wpt has a testcase like this:
```
test_interpolation({
  property: 'scale',
  from: 'none',
  to: '4 3 2',
}, [
  {at: -1, expect: '-2 -1 0'},
  {at: 0, expect: 'none'},
  {at: 0.125, expect: '1.375 1.25 1.125'},
  {at: 0.875, expect: '3.625 2.75 1.875'},
  {at: 1, expect: '4 3 2'},
  {at: 2, expect: '7 5 3'}
]);
```
We do animation from `none` to `4 3 2` in the above testcase. However, the spec [2] says
> When translate, rotate or scale are animating or transitioning, and the from value or to value (but not both) is none, the value none is replaced by the equivalent identity value (0px for translate, 0deg for rotate, 1 for scale).

This means at 0%, the serialization should be `1 1 1` because we should convert it into `scale3d`, right? It seems the wpt converts it back to `none` for serialization at 0% or 100% for now.

Besides, the following question is:
if we do interpolation from `26 17 9` to `2 1`, the serialization result at 100% is `2 1` or `2 1 1`? Just want to know should we treat the serialization at 0% and 100% as a special case for individual transform? It seems the spec says we should convert it to a interpolatable value during animation, but seems the current wpt doesn't follow this? (Or maybe other specs define this but I didn't notice.)
Thanks.

cc @birtles 

[1] https://github.com/web-platform-tests/wpt/blob/master/css/css-transforms/animation/scale-interpolation.html
[2] https://drafts.csswg.org/css-transforms-2/#individual-transforms

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/315 using your GitHub account
Received on Tuesday, 6 November 2018 19:14:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 November 2018 00:46:02 UTC