Re: [css3-animations] Transitions on moving targets (was Re: Override of animation rule by !important)

On 29 January 2012 01:19, L. David Baron <dbaron@dbaron.org> wrote:
> [ In the future, when you change the subject of a thread, please
>  change the Subject: header of your message.  I've done that. ]
>
> [ Also, writing this on board an airplane, so apologies if the
>  discussion has already covered this by the time I land. ]
>
> On Friday 2012-01-20 17:06 +0000, Jon Rimmer wrote:
>> For both animations and transitions, at any instant, we have a base
>> property value, a target property value, and an interpolation function
>> that produces an intermediate value based on the duration and the
>> easing. All we need is a simple pipeline, where the instantaneous,
>> intermediate value from the animation is fed as the base value into
>> the interpolation function of the transition.
>
> I think this doesn't make sense with transitions as they are today
> because of the mechanism with which transitions start:  they start
> in response to changes in computed values.  If there's another
> animation running (a moving target), the computed value is
> constantly changing.  If transitions, initiated today via
> 'transition-property', started in response to changes in computed
> value caused by other animations it would only serve to damp those
> animations in bizarre ways.  And since the model of transitions that
> happen based on 'transition-property' is based on computed values,
> it's not clear how a change in the value "underneath" the animation
> would start an animation since that change would not be reflected in
> the computed value.
>
> However, if we had an API to initiate a one-off transition (which I
> think would probably be a good idea), I think the concept you're
> talking about might make more sense.
>

I'm not sure I understand. This isn't about transitions being
triggered by animations, it's about transitions triggered by an
!important flagged rule that begins to match during the animation.
Because they are flagged as !important, the changes they apply are no
longer "underneath" the animation, that's the point.

The question isn't about what the computed value is, it's what the
"from" and "to" input values for the interpolation are to produce the
intermediate computed value during the transition. In particular what
to do when either the "from" or "to" value changes mid-way through the
transition. This is something that can happen even without animations,
e.g. http://jsfiddle.net/amtiskaw/xKw58/

At present, in the browsers I tried, any change to the underlying
"from" value is ignored until the transition out starts. This is
perfectly reasonable, but isn't the only way it could work. In theory
transitions could be specified to track changes to the underlying
value throughout the interpolation. I talked a bit about the possible
ramifications of doing this, or not doing it, in another post.

Thanks,

Jon

Received on Sunday, 29 January 2012 16:39:20 UTC