Skip to content

Commit c60bcce

Browse files
committed
[css-transitions-2][css-animations-2] Clarify phase for events when there is no target effect
1 parent 3913734 commit c60bcce

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

css-animations-2/Overview.bs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ urlPrefix: https://w3c.github.io/web-animations/; type: dfn; spec: web-animation
8585
text: target element
8686
text: target effect
8787
text: target effect end
88+
text: unresolved
8889
</pre>
8990

9091
<h2 id="delta">Delta specification</h2>
@@ -404,8 +405,12 @@ the Web Animations model are used. These definitions apply to an <a>animation
404405
effect</a>, however, for the purpose of dispatching events, we consider a
405406
CSS Animation to have the same phase as its <a>target effect</a>. For example,
406407
a CSS Animation is in the <a>before phase</a> if its <a>target effect</a>
407-
is in the <a>before phase</a>. A CSS Animation that does not have a <a>target
408-
effect</a> is considered to be in the <a>idle phase</a>.
408+
is in the <a>before phase</a>.
409+
410+
A CSS Animation that does not have a <a>target effect</a> is considered to be in
411+
the <a>idle phase</a> if its <a>current time</a> is <a>unresolved</a>, in the
412+
<a>before phase</a> if its <a>current time</a> is less than zero, and in the
413+
<a>after phase</a> otherwise.
409414
410415
Similarly, subsequent references to the <a>start delay</a>, <a>active
411416
duration</a>, <a>current iteration</a>, <a>iteration start</a>, and

css-transitions-2/Overview.bs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ urlPrefix: https://w3c.github.io/web-animations/; type: dfn; spec: web-animation
4040
text: animation class
4141
text: animation playback rate
4242
text: current iteration
43+
text: current time
4344
text: fill mode
4445
text: global animation list
4546
text: idle play state
@@ -50,6 +51,7 @@ urlPrefix: https://w3c.github.io/web-animations/; type: dfn; spec: web-animation
5051
text: start delay
5152
text: target effect
5253
text: target effect end
54+
text: unresolved
5355
</pre>
5456
<pre class=link-defaults>
5557
spec:css-transitions-1; type:value; text:all
@@ -176,7 +178,17 @@ below:
176178

177179
<dl class=switch>
178180
<dt>If the transition has no <a>target effect</a>,
179-
<dd>The transition phase is &lsquo;idle&rsquo;.
181+
<dd>
182+
The transition phase is set according to the first matching condition
183+
from below:
184+
<dl class=switch>
185+
<dt>If the transition has an <a>unresolved</a> <a>current time</a>,
186+
<dd>The transition phase is &lsquo;idle&rsquo;.
187+
<dt>If the transition has a <a>current time</a> &lt; 0,
188+
<dd>The transition phase is &lsquo;before&rsquo;.
189+
<dt>Otherwise,
190+
<dd>The transition phase is &lsquo;after&rsquo;.
191+
</dl>
180192
<dt>If the transition is <a lt="pending play state">pending</a> and its
181193
phase was previously &lsquo;idle&rsquo; or &lsquo;pending&rsquo;,
182194
<dd>The transition phase is &lsquo;pending&rsquo;.

0 commit comments

Comments
 (0)