Skip to content

Commit

Permalink
[css-contain-2] Replace the manual description of animation updates b…
Browse files Browse the repository at this point in the history
…y waving at Animation/Transitions 2. Fixes #5611.
  • Loading branch information
tabatkins committed Feb 11, 2022
1 parent 81ce601 commit 1ef1262
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions css-contain-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1660,28 +1660,19 @@ Restrictions and Clarifications {#cv-notes}

If script queries the style of a [=skipped=] element
(causing a [=style change event=])
such that knowing the state of animations is required
such that knowing the state of animations or transitions is required
to return correct information,
animations are "refreshed" at that moment
animation and transitions are sampled
according to the styles at the time of that [=style change event=]:
new animations are created if necessary;
existing animations are advanced
to the point on their timeline they would have been at
were they never skipped at all;
animations that have would have ended since the last "refresh"
are ended.

If a transition or animation-related event would have been triggered
as a result of changes occurring during the "refresh" interval,
they are fired when the animations are "refreshed",
in the same order they would have originally fired in
had the element never been [=skipped=].
If multiple iterations of an animation would have completed during this period,
only one {{animationiteration}} event must be triggered,
ordered as if it were triggered at the first completed iteration during the refresh interval.

[[css-animations-2#events]] and [[css-transitions-2#events]]
defines what objects are created
and what events are fired,
with what data,
when an animation or transition is updated,.

When an element stops being [=skipped=],
animations are refreshed
animations and transitions are sampled
and then resume advancing on their timelines as normal from that point.

Note: Overall, this is similar to the behavior of transitions/animations
Expand Down

0 comments on commit 1ef1262

Please sign in to comment.