Re: [svgwg] Serialization format for path strings

> > There is currently no concept of "when needed" and it introduces a lot of complexity.
> 
> I don't see how this different is from any other data format that converts values to support transitions. E.g., transitioning from `transform: rotate(1turn)` to `transform: scale(2)`, you transition via a matrix transform. To transition from `width: 100%` to `width: 10px` you transition via a `calc()` expression. So the answers re step timing functions and values at exact keyframe points would be "do whatever you do in those cases".

The `transform` example is difficult because computed transform lists are always serialized as `matrix()` so the "when needed" behavior isn't observable and doesn't give us any precedent (e.g. we can't tell if the value corresponding to `scale(2)` returned from `getComputedStyle` during an  animation's forwards fill phase is being converted to a `matrix()` due to it still being treated as an animated value, or simply due to the serialization behavior).

Similarly for `width` since the result is always a pixel value there (due to `getComputedStyle` returning the used value with `width`).

For properties that actually do return `calc()` from `getComputedStyle` such as `background-position` the notion of "when needed" isn't particularly consistent.

For example, if you try this pen: https://codepen.io/birtles/pen/BObNXd

In Firefox you'll get results like:
```
Calc used with step timing function? false
Calc used when sampling exactly at keyframe? true
Calc used when filling forwards? false
Calc used when filling backwards? true
Calc used when using keywords? false
```

In Chrome you'll get false everywhere (i.e. (2) from above, which I'm pretty sure is wrong per-spec).

I'm concerned about saying "do whatever you do in those cases" since even if we take that to mean "do whatever you do for background-position" it's different between engines (and inconsistent even within the one engine). Furthermore, I'm not even sure what behavior we would want to specify for each of the different cases.

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/321#issuecomment-423414698 using your GitHub account

Received on Friday, 21 September 2018 05:07:43 UTC