Re: [css-animations] How animation-timing-function in keyframe rule interacts with direction

On Oct 18, 2014, at 8:29 AM, Simon Fraser <smfr@me.com> wrote:

> On Oct 18, 2014, at 12:05 am, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
>> On Fri, Oct 17, 2014 at 7:09 PM, Simon Fraser <smfr@me.com> wrote:
>>> On Oct 16, 2014, at 2:47 PM, Sylvain Galineau <galineau@adobe.com> wrote:
>>>> We should resolve the issue raised by dbaron [1] (Bug 14805 [2])
>>>> 
>>>> If we have:
>>>> 
>>>>      @keyframes timings {
>>>>              25% { animation-timing-function: linear; }
>>>>              40% { animation-timing-function: ease-out; }
>>>>      }
>>>> 
>>>> ..then when the animation moves forward we expect linear to apply between 25% and 40%. But if the animation is moving backward e.g. due to an animation-direction: alternate then we also want linear to apply between 40% and 25%.
>>>> 
>>>> Objections?
>>>> 
>>>> 
>>>> [1] http://lists.w3.org/Archives/Public/www-style/2011Mar/0744.html
>>>> [2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=14805
>>> 
>>> 
>>> I don’t think that’s right. The reverse animation should be a mirror-image of the forward animation, so the reverse animation should be linear for the last 25% of its travel.
>> 
>> Maybe you misread?  The forward animation is not linear in its first
>> 25%, it's whatever the 'animation' property sets as its timing
>> function.  The forward animation is linear between 25% and 40%, so the
>> reverse animation should be linear between 40% and 25% (counting
>> backwards).
> 
> You’re right, I missed the missing 0% keyframe.

Added this animation-timing-function:

	# When specified in a keyframe, 'animation-timing-function' defines the progression of the 
	# animation between the keyframe and the next keyframe in sorted keyframe selector order, or
	# the end of the animation if no other keyframe is defined. The specified timing function will
	# apply over this interval independently of the animation's current direction.

Makes sense?

Received on Monday, 20 October 2014 17:30:19 UTC