- From: andruud via GitHub <sysbot+gh@w3.org>
- Date: Wed, 10 Jun 2020 10:28:08 +0000
- To: public-css-archive@w3.org
> The object returned represents the actual values we are interpolating between at that point. I admit I didn't think about it that way. In isolation that's fair enough. > Interpolation happens in computed value space so we have to convert to computed values to interpolate and the object returned accurately represents that. Didn't think about it that way either. I was thinking interpolation happens in specified value space, e.g. interpolation from `10em` to `20em` becomes `15em` at t=0.5, and then the `em` is resolved. Sounds like your mental model is that both `10em` and `20em` endpoints are dynamically resolved, and then interpolation happens on those values in `px`. I guess there's no observable difference. > doesn't make these values "random" any more than the values from getComputedStyle are "random" If you do `div { font-size: 10px; width: 10em; }`, and then round-trip the `getComputedStyle` result of `width`, the width will no longer be responsive to changes in `font-size`, but you'll at least get the same computed value for `width` beyond that. And if you do: ``` @keyframes test { from { font-size: 10px; width: 10em; } to { font-size: 20px; width: 20em; } } ``` And roundtrip that with `getKeyframes()/setKeyframes()` at t=0 for example, you get an animation for `width` that's no longer responsive to changes in `font-size`, so maybe that's indeed consistent with gCS. But you also get an interpolation for `width` that's different than the one you would otherwise get. On the one hand this is natural consequence of the interpolation not being responsive to `font-size` any more, but on the other hand it feels unnecessarily "unstable". If gCS is able to roundtrip a specific _value_, it seems to fair to at least initially expect that get/setKeyframes should be able to roundtrip a specific _interpolation_, and not just a specific state of the interpolation. > getComputedKeyframes() Is that basically what this is? :slightly_smiling_face: -- GitHub Notification of comment by andruud Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5125#issuecomment-641911017 using your GitHub account
Received on Wednesday, 10 June 2020 10:28:10 UTC