W3C home > Mailing lists > Public > www-style@w3.org > February 2012

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

From: Shane Stephens <shans@google.com>
Date: Wed, 8 Feb 2012 22:25:18 -0800
Message-ID: <CAGTfzwQD0rFVzcwKGUhk25WjUUb5uGoXk=vj5u4fFhn3Dmto-w@mail.gmail.com>
To: Brian Birtles <birtles@gmail.com>
Cc: www-style@w3.org
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 06:27:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT