You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-values] [web-animations] Question about "not additive" for discrete animation #9070
If a value type does not define a specific procedure for addition or is defined as not additive, its addition operation is simply Vresult = Va.
Because addition is not commutative, and I expect Va is the underlying value, and Vb is the value to combine (i.e. the keyframe effect value), per the-effect-value-of-a-keyframe-animation-effect.
Get the composited value for "from": 100px + 100px = 200px.
Get the composited value for "to": 100px + auto = 100px, because discrete is not additive and Vresult = Va.
Therefore, this becomes an interpolation from 200px to 100px. However, this mismatches the wpt and the current behavior of all the browsers. The interpolation is something like from 200px to auto:
We use discrete for <line-names>, and we use the keyframe value (i.e. Vb) as the composited <line-names> values in this test case.
I guess I may miss something. However, per these examples and current behaviors of all browsers, should we change the spec words for non-additive in [css-values-4] to use Vresult = Vb or effect value? Or perhaps we have similar definition in [web-animations]?
Activity
birtles commentedon Jul 15, 2023
That seems to make sense to me. I can't recall why we made it Va in the first place.
I looked up the SMIL spec to see if it came from there, but even it has:
[css-values-4] When you can't add two values, use the *second* value …
tabatkins commentedon Oct 23, 2023
We edited the spec to match (it's now Vb).
tabatkins commentedon Oct 23, 2023
(Since the editors, impls, and WPTs all agree, this is as open-and-shut of an edit as we can really get.)