Re: [css3-animations] What does animation-fill-mode do when animation-iteration-count is zero?

This issue has been logged already.

<https://www.w3.org/Bugs/Public/show_bug.cgi?id=15841>
<http://lists.w3.org/Archives/Public/www-style/2012Feb/0077.html>

The options seem to be:
1. Even if the animation ends half-way through a cycle, apply the style from the final keyframe for fill.
2. Apply a fill style corresponding to the state of the animation when it ended, which may be half-way between keyframes.

I agree that (2) seems less surprising.

An alternative is to disallow fractional animation-interation-count.

Simon

On Feb 9, 2012, at 7:25 AM, Shane Stephens wrote:

> What currently happens with a non-integer animation-iteration-count
> and animation-fill-mode: both?
> 
> According to the spec at least, an animation-fill-mode of forwards or
> both applies the values in the most recently executing keyframe once
> the animation has ended. Does that mean setting an
> animation-iteration-count of 0.5 and animation-fill-mode of forwards
> for an animation with only a from and a to keyframe will result in the
> values specified in the from keyframe being applied after the
> animation has ended?
> 
> Regardless, I agree strongly with Tab and Brian that continuity is
> more desirable - we want to provide abstractions that are minimally
> surprising to web developers, and:
> (1) abstractions that have suddenly discontinuous results when
> specifying continuous values are more surprising than those which
> don't
> (2) abstractions that allow two different implementations to provide
> completely different results from the same input values are more
> surprising than those which don't
> 
> Cheers,
>    -Shane
> 
> On Tue, Feb 7, 2012 at 12:33 AM, Brian Birtles <birtles@gmail.com> wrote:
>> (2012/02/06 18:56), Tab Atkins Jr. wrote:
>>> 
>>> I'm also okay with this, though if we're accepting that non-integer
>>> iteration counts are useful, I think that counts between 0 and 1 are
>>> fine.
>> 
>> 
>> I've found with SVG Animation that non-integer iteration counts are pretty
>> useful. For example, if you have motion on a loop path it's not uncommon to
>> want to run the loop 1.5 times. repeatCount="1.5" is a lot simpler than
>> using keyPoints, or end times etc. for that.
>> 
>> (Also, a lot of other features in SVG such as repeatDur assume you can do
>> fractions of intervals. I suspect CSS will also need this eventually.)
>> 
>> I agree with Tab that if you allow non-integer iteration counts, you should
>> allow values between 0 and 1.
>> 
> 

Received on Thursday, 9 February 2012 08:06:26 UTC