Skip to content

Commit 48d5cc9

Browse files
author
Sylvain Galineau
committed
[css-animations] Clarify active duration and its relationship to negative animation delays
1 parent eceae64 commit 48d5cc9

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

css-animations/Overview.bs

+11-4
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,14 @@ The 'animation-iteration-count' property</h3>
482482

483483
The 'animation-iteration-count' property specifies the number of times an animation cycle
484484
is played. The initial value is ''1'', meaning the animation will play from beginning to end
485-
once. This property is often used in conjunction with an
485+
once. This property is often used in conjunction with an
486486
'animation-direction' value of ''alternate'', which will cause the animation to play in
487487
reverse on alternate cycles.
488488

489+
The time window during which the animation is active
490+
(<code>duration</code> x <code>iteration-count</code>)
491+
is known as the <dfn>active duration</dfn>.
492+
489493
<pre class='propdef'>
490494
Name: animation-iteration-count
491495
Value: <<single-animation-iteration-count>>#
@@ -641,7 +645,8 @@ The 'animation-delay' property</h3>
641645
Similar to a delay of ''0s'', it means that the animation executes immediately,
642646
but is automatically progressed by the absolute value of the delay,
643647
as if the animation had started the specified time in the past,
644-
and so it appears to start partway through its play-cycle already.
648+
and so it appears to start partway through its
649+
<a href="#animation-iteration-count">active duration</a>.
645650
If an animation's keyframes have an implied starting value,
646651
the values are taken from the time the animation starts,
647652
not some time in the past.
@@ -1036,6 +1041,8 @@ Acknowledgements</h2>
10361041

10371042
Thanks especially to the feedback from
10381043
Tab Atkins,
1044+
Brian Birtles,
1045+
Shane Stephens,
10391046
Carine Bournez,
10401047
Christian Budde,
10411048
Anne van Kesteren,
@@ -1057,9 +1064,9 @@ Working Group Resolutions that are pending editing</h2>
10571064
<li>Detail how/when keyframe values are computed; using <a href="http://lists.w3.org/Archives/Public/www-style/2014Aug/0132.html">G.beta in dbaron's mail</a>
10581065
<li>Agreed that both transitions and animations animate all properties. css-transitions to define animation of non-interoperable/discrete values. They take their starting values below 50% timing function progress, and end values above
10591066
<li>Dynamic changes to animation properties/keyframes. Tab to propose resolution. (<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=14713">Bug 14713</a>)
1060-
<li>Negative animation-delay values apply against the active duration of the animation i.e. (animation-duration*animation-iteration-count). The delay can thus swallow iterations for which no iteration event will be fired. The start/end events are still fired. Even when delay == (-1*active_duration)
1067+
<li><del>Negative animation-delay values apply against the active duration of the animation i.e. (animation-duration*animation-iteration-count). The delay can thus swallow iterations for which no iteration event will be fired. The start/end events are still fired. Even when delay == (-1*active_duration)
10611068
<li><del>Fire animation start/end events when animation-duration is zero, with 0 elapsedTime
1062-
<li>If animation-iteration-count is infinite and duration is 0, treat the iteration-count as if it was finite and run a 0s second (option A in <a href="http://lists.w3.org/Archives/Public/www-style/2014Sep/0056.html">Brian's mail</a>)
1069+
<li><del>If animation-iteration-count is infinite and duration is 0, treat the iteration-count as if it was finite and run a 0s second (option A in <a href="http://lists.w3.org/Archives/Public/www-style/2014Sep/0056.html">Brian's mail</a>)
10631070
<li><del>If an animation with a negative animation delay is initially paused, the start event still fires
10641071
</ul>
10651072

css-animations/Overview.html

+14-6
Original file line numberDiff line numberDiff line change
@@ -577,10 +577,14 @@ <h3 class="heading settled heading" data-level=4.5 id=animation-iteration-count>
577577

578578
<p> The <a class=property data-link-type=propdesc href=#propdef-animation-iteration-count title=animation-iteration-count>animation-iteration-count</a> property specifies the number of times an animation cycle
579579
is played. The initial value is <span class=css data-link-type=maybe title=1>1</span>, meaning the animation will play from beginning to end
580-
once. This property is often used in conjunction with an
580+
once. This property is often used in conjunction with an
581581
<a class=property data-link-type=propdesc href=#propdef-animation-direction title=animation-direction>animation-direction</a> value of <a class=css data-link-type=maybe href=#valuedef-alternate title=alternate>alternate</a>, which will cause the animation to play in
582582
reverse on alternate cycles.
583583

584+
<p> The time window during which the animation is active
585+
(<code>duration</code> x <code>iteration-count</code>)
586+
is known as the <dfn data-dfn-type=dfn data-noexport="" id=active-duration>active duration<a class=self-link href=#active-duration></a></dfn>.
587+
584588
<table class="definition propdef"><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-animation-iteration-count>animation-iteration-count<a class=self-link href=#propdef-animation-iteration-count></a></dfn><tr><th>Value:<td class=prod><a class="production css-code" data-link-type=type href=#typedef-single-animation-iteration-count title="<single-animation-iteration-count>">&lt;single-animation-iteration-count&gt;</a>#<tr><th>Initial:<td>1<tr><th>Applies to:<td>all elements, ::before and ::after pseudo-elements<tr><th>Inherited:<td>no<tr><th>Media:<td>interactive<tr><th>Computed value:<td>As specified<tr><th>Canonical order:<td>per grammar<tr><th>Percentages:<td>N/A<tr><th>Animatable:<td>no</table>
585589
<p> <dfn class=css-code data-dfn-type=type data-export="" id=typedef-single-animation-iteration-count>&lt;single-animation-iteration-count&gt;<a class=self-link href=#typedef-single-animation-iteration-count></a></dfn> = infinite | <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#number-value title="<number>">&lt;number&gt;</a>
586590

@@ -688,7 +692,8 @@ <h3 class="heading settled heading" data-level=4.8 id=animation-delay><span clas
688692
Similar to a delay of <span class=css data-link-type=maybe title=0s>0s</span>, it means that the animation executes immediately,
689693
but is automatically progressed by the absolute value of the delay,
690694
as if the animation had started the specified time in the past,
691-
and so it appears to start partway through its play-cycle already.
695+
and so it appears to start partway through its
696+
<a href=#animation-iteration-count>active duration</a>.
692697
If an animation’s keyframes have an implied starting value,
693698
the values are taken from the time the animation starts,
694699
not some time in the past.
@@ -1051,6 +1056,8 @@ <h2 class="heading settled heading" data-level=7 id=acknowledgements><span class
10511056

10521057
<p> Thanks especially to the feedback from
10531058
Tab Atkins,
1059+
Brian Birtles,
1060+
Shane Stephens,
10541061
Carine Bournez,
10551062
Christian Budde,
10561063
Anne van Kesteren,
@@ -1072,10 +1079,10 @@ <h2 class="heading settled heading" data-level=8 id=wg-resolutions-pending><span
10721079
<li>Detail how/when keyframe values are computed; using <a href=http://lists.w3.org/Archives/Public/www-style/2014Aug/0132.html>G.beta in dbaron’s mail</a>
10731080
<li>Agreed that both transitions and animations animate all properties. css-transitions to define animation of non-interoperable/discrete values. They take their starting values below 50% timing function progress, and end values above
10741081
<li>Dynamic changes to animation properties/keyframes. Tab to propose resolution. (<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=14713">Bug 14713</a>)
1075-
<li>Negative animation-delay values apply against the active duration of the animation i.e. (animation-duration*animation-iteration-count). The delay can thus swallow iterations for which no iteration event will be fired. The start/end events are still fired. Even when delay == (-1*active_duration)
1076-
<li><del>Fire animation start/end events when animation-duration is zero, with 0 elapsedTime
1077-
</del><li>If animation-iteration-count is infinite and duration is 0, treat the iteration-count as if it was finite and run a 0s second (option A in <a href=http://lists.w3.org/Archives/Public/www-style/2014Sep/0056.html>Brian’s mail</a>)
1078-
<li><del>If an animation with a negative animation delay is initially paused, the start event still fires
1082+
<li><del>Negative animation-delay values apply against the active duration of the animation i.e. (animation-duration*animation-iteration-count). The delay can thus swallow iterations for which no iteration event will be fired. The start/end events are still fired. Even when delay == (-1*active_duration)
1083+
</del><li><del>Fire animation start/end events when animation-duration is zero, with 0 elapsedTime
1084+
</del><li><del>If animation-iteration-count is infinite and duration is 0, treat the iteration-count as if it was finite and run a 0s second (option A in <a href=http://lists.w3.org/Archives/Public/www-style/2014Sep/0056.html>Brian’s mail</a>)
1085+
</del><li><del>If an animation with a negative animation delay is initially paused, the start event still fires
10791086
</del></ul>
10801087

10811088
<li>2012-10-29 minutes
@@ -1245,6 +1252,7 @@ <h3 class="no-num no-ref heading settled heading" id=informative><span class=con
12451252
<h2 class="no-num no-ref heading settled heading" id=index><span class=content>
12461253
Index</span><a class=self-link href=#index></a></h2>
12471254
<div data-fill-with=index><ul class=indexlist>
1255+
<li>active duration, <a href=#active-duration title="section 4.5">4.5</a>
12481256
<li>alternate, <a href=#valuedef-alternate title="section 4.6">4.6</a>
12491257
<li>alternate-reverse, <a href=#valuedef-alternate-reverse title="section 4.6">4.6</a>
12501258
<li>animation, <a href=#propdef-animation title="section 4.10">4.10</a>

0 commit comments

Comments
 (0)