You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p><adata-link-type="dfn" href="https://w3c.github.io/web-animations/#animation">Animations</a> generated from the markup or interfaces
219
+
(e.g. the <codeclass="idl"><adata-link-type="idl" href="#dom-cssanimation-cssanimation">CSSAnimation()</a></code> constructor) defined in this specification have an <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#animation-type">animation type</a> of ‘CSS Animation’.</p>
220
+
<p>CSS Animations <em>with</em> an <adata-link-type="dfn" href="#owning-element">owning element</a> have a <em>later</em> composite order than CSS Transitions but an <em>earlier</em> composite order
221
+
than animations without a specific <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#animation-type">animation type</a>.</p>
222
+
<p>Within the set of CSS Animations <em>with</em> an <adata-link-type="dfn" href="#owning-element">owning element</a>, two
223
+
animations <var>A</var> and <var>B</var> are sorted in composite order (first to
224
+
last) as follows:</p>
225
+
<ol>
226
+
<lidata-md="">
227
+
<p>If the <adata-link-type="dfn" href="#owning-element">owning element</a> of <var>A</var> and <var>B</var> differs, sort <var>A</var> and <var>B</var> by <adata-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-tree-order">tree order</a> of their corresponding <adata-link-type="dfn" href="#owning-element">owning elements</a>.
228
+
With regard to pseudo-elements, the sort order is as follows:</p>
229
+
<ul>
230
+
<lidata-md="">
231
+
<p>element</p>
232
+
<lidata-md="">
233
+
<p>::before</p>
234
+
<lidata-md="">
235
+
<p>::after</p>
236
+
<lidata-md="">
237
+
<p>element children</p>
238
+
</ul>
239
+
<lidata-md="">
240
+
<p>Otherwise, sort <var>A</var> and <var>B</var> based on their position in the
241
+
computed value of the <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-name">animation-name</a> property of the (common) <adata-link-type="dfn" href="#owning-element">owning
242
+
element</a>.</p>
243
+
</ol>
244
+
<p>The composite order of CSS Animations <em>without</em> an <adata-link-type="dfn" href="#owning-element">owning element</a> is based on their position in the <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#global-animation-list">global animation list</a>.</p>
245
+
<p>CSS Animations generated using the markup defined in this specification are <em>not</em> added to the <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#global-animation-list">global animation list</a> when they are created.
246
+
Instead, these animations are appended to the <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#global-animation-list">global animation list</a> at
247
+
the first moment when they transition out of the <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#idle-play-state">idle play state</a> after
248
+
being disassociated from their <adata-link-type="dfn" href="#owning-element">owning element</a>.
249
+
CSS Animations that have been disassociated from their <adata-link-type="dfn" href="#owning-element">owning element</a> but are still <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#idle-play-state">idle</a> do not have a defined
250
+
composite order.</p>
251
+
<pclass="note" role="note">Note, this behavior relies on the fact that disassociating an animation
252
+
from its <adata-link-type="dfn" href="#owning-element">owning element</a> always causes it to enter (or remain) in the <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#idle-play-state">idle play state</a>.</p>
253
+
<p>CSS Animations created using the <codeclass="idl"><adata-link-type="idl" href="#dom-cssanimation-cssanimation">CSSAnimation()</a></code> constructor are appended
254
+
to the <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#global-animation-list">global animation list</a> at the moment they are constructed.</p>
<h4class="heading settled" data-level="3.1.1" id="interaction-between-animation-play-state-and-web-animations-API"><spanclass="secno">3.1.1. </span><spanclass="content">Interaction between <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state">animation-play-state</a> and the Web Animations API</span><aclass="self-link" href="#interaction-between-animation-play-state-and-web-animations-API"></a></h4>
0 commit comments