Re: [csswg-drafts] [css-color][css-animations] Is it specified anywhere that a color animation at time=0 exactly match the from color's computed value? (#13269)

> Is this behavior, of acting like no interpolation happed at all, specified anywhere?

Yes, it falls out of the [interpolation procedure](https://drafts.csswg.org/css-values-4/#interpolation) which has:

> Given two property values VA and VB, produces an intermediate value Vresult at a distance of p along the interval between VA and VB such that p = 0 produces VA and p = 1 produces VB. 

> It seems like in the general case, the animations spec should be clear whether you get the **specified** or **computed** value
> 
>  - when it has to be computed because it isn't one of the stops
>  - when it exactly matches a stop (it could still return the computed value, of course, if the spec says so)

It always uses computed values as per https://drafts.csswg.org/web-animations-1/#calculating-computed-keyframes specifically where it has:

> [Compute a property value](https://drafts.csswg.org/web-animations-1/#compute-a-property-value) using the value specified on keyframe as the value, and the [target element](https://drafts.csswg.org/web-animations-1/#effect-target-target-element) as the element; then add the property and resulting value to computed keyframe.

It's just that `rgb(255, 0, 0)` is a computed value, but it's never interpolated with anything because it's at the endpoint of the interpolation interval.

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13269#issuecomment-3693551754 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 27 December 2025 01:33:33 UTC