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

Re: [css3-animations] animation-fill-mode: fractional iteration count, steps and animation-direction

From: Brian Birtles <birtles@gmail.com>
Date: Wed, 04 Apr 2012 10:34:02 +0900
Message-ID: <4F7BA50A.7040600@gmail.com>
To: www-style@w3.org
(2012/04/04 9:36), L. David Baron wrote:
> For these cases (the 0%/100% boundaries, i.e., the iteration
> boundaries), we want the state of the animation on the iteration
> *before* the point in time (but I think we still want its state, in
> terms of step functions, at the point in time).  (Gecko does do
> this, because I had to write code to handle that case and thus I had
> to think about it.)  This is critical given that the value of
> 'animation-direction' is 'normal':  without this it would mean that
> an integer 'animation-iteration-count' would jump back to the start
> of the animation and freeze there, rather than freezing at the end.

SMIL and SVG handle this with endpoint-exclusive timing.[1] An animation 
that starts at t=1s with a duration of 1s, effectively runs until 
t=1.99999s. At t=2.0s it will have no effect. In the absence of the 
direction property, the *only* time where you actually use the 100% 
value is when you fill and your fill time corresponds to an iteration 
boundary.[2]

This model provides intuitive behaviour for iteration boundaries, 
sequencing boundaries, accumulation of iterated values etc.

I don't think CSS Animations needs to describe endpoint-exclusive timing 
at this stage (since it doesn't have sequencing, accumulation of 
iterated values etc.) but I think it would be good if the behaviour 
defined in CSS Animations was compatible with this model so that such 
features can be easily added later.

I think what David has suggested regarding the wording is compatible and 
easy to understand. However, I don't think we want to talk about taking 
the state of animation "before" the iteration boundary since that sounds 
to me like it could be a different value to the final value.

Another possibility is to write something similar to the final paragraph 
in the OP with the qualification of what value to use when the fill time 
corresponds to an iteration boundary and the direction is normal or 
reverse. To me, that might be even simpler to understand.

Best regards,

Brian Birtles

[1] http://www.w3.org/TR/SMIL/smil-timing.html#q101
[2] http://www.w3.org/TR/SMIL/smil-timing.html#Timing-fillAttribute
Received on Wednesday, 4 April 2012 01:34:33 GMT

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