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: Sylvain Galineau <sylvaing@microsoft.com>
Date: Fri, 3 Feb 2012 17:32:59 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: Øyvind Stenhaug <oyvinds@opera.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F01782903422A5B@TK5EX14MBXC295.redmond.corp.microsoft.com>

[Tab Atkins Jr.:]
> 
> On Thu, Feb 2, 2012 at 8:10 PM, Sylvain Galineau <sylvaing@microsoft.com>
> wrote:
> > [Tab Atkins Jr.:]
> >> On Thu, Feb 2, 2012 at 5:30 AM, Øyvind Stenhaug <oyvinds@opera.com>
> wrote:
> >> > On Thu, 02 Feb 2012 01:58:33 +0100, Sylvain Galineau
> >> > <sylvaing@microsoft.com> wrote:
> >> >> I assume animation-iteration-count:0 means no animation occurs and
> >> >> no animation events are thrown regardless of duration and delay.
> >> >>
> >> >> Does animation-fill-mode have any effect in this case?
> >> >
> >> > When I raised this back in
> >> > <http://lists.w3.org/Archives/Public/www-style/2011Oct/0107.html>,
> >> > David argued that it would make sense to avoid a discontinuity at 0.
> >> > With that reasoning,
> >> >
> >> > - start event and end event should dispatch at the end of the delay
> >> > - fill mode 'backwards'/'both' should have an effect during the
> >> > delay phase
> >> > - fill mode 'forwards'/'both' should have an effect after the delay
> >> > phase
> >>
> >> I agree with dbaron that this is the ideal behavior.
> >>
> > Why is it ideal?
> 
> For the reason dbaron gives - it avoids a discontinuity at 0, which we try
> to avoid in CSS (as it causes surprises).
> 
> One could argue that someone setting animation-iteration-count to 0 is
> trying to "turn off" the animation, but there's already a simple way to
> turn off an animation - either change animation-name to 'none', or remove
> it from the animation declarations directly.  There's no need to add an
> additional way.
> 
What is the use-case where such a discontinuity is a problem? I certainly 
appreciate the benefit of avoiding discontinuities in property values that 
are likely to be animated (through script or CSS). Unless we plan on allowing 
animation properties like this one to be animated I'm not sure what the 
benefits of sticking to this principle are here without a use case e.g. do we 
want to allow a 0 iteration count to function as some kind of freeze to do...what?

Side note: I've assumed transition-* and animation-* properties are not animatable.
I think we should state that somewhere if it isn't already.
Received on Friday, 3 February 2012 17:34:37 GMT

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