Skip to content

Commit 77cbb15

Browse files
committed
2009-11-17 dino@apple.com
- added rules for reversibility of transforms (improved)
1 parent 7c4987c commit 77cbb15

2 files changed

Lines changed: 68 additions & 27 deletions

File tree

css3-transitions/Overview.html

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929

3030
<h1>CSS Transitions Module Level 3</h1>
3131

32-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 17 November
32+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 18 November
3333
2009</h2>
3434

3535
<dl>
3636
<dt>This version:
3737

38-
<dd> <a href="http://www.w3.org/TR/2009/ED-css3-transitions-20091117">
38+
<dd> <a href="http://www.w3.org/TR/2009/ED-css3-transitions-20091118">
3939
http://dev.w3.org/csswg/css3-transitions/</a>
40-
<!--http://www.w3.org/TR/2009/WD-css3-transitions-20091117-->
40+
<!--http://www.w3.org/TR/2009/WD-css3-transitions-20091118-->
4141

4242
<dt>Latest version:
4343

@@ -710,25 +710,42 @@ <h2 id=reversing><span class=secno>3 </span> Automatically reversing
710710
the expected behavior is that the new transition should be the reverse of
711711
what has already executed.
712712

713-
<p> If a currently executing transition is interrupted and the
714-
transitioning property value is set to the original starting value for the
715-
interrupted transition, and no other transition-related properties have
716-
changed, then the new transition should be the reverse of the interrupted
717-
transition. The new transition will execute with a duration that is the
718-
elapsed time of the interrupted transition at the moment it was
719-
interrupted. The timing function for the new transition will be the
720-
portion of the curve traversed up to the point of reversal, followed in
721-
the opposite direction to the starting point. The new transition will not
722-
begin with a delay, even if one was specified. If the existing transition
723-
was interrupted during its delay period, the new transition will execute
724-
instantly.
713+
<p> If a running transition with duration T, executing so far for duration
714+
TE, from state A, to state B, is interrupted by a property change that
715+
would start a new transition back to state A, and all the transition
716+
attributes are the same (duration, delay and timing function), then the
717+
new transition must reverse the effect. The new transition must:
718+
719+
<ol>
720+
<li> Use the B and A states as its "from" and "to" states respectively. It
721+
does not use the current value as its from state, due to the rules below.
722+
723+
724+
<li> Execute with the same duration T, but starting as if the transition
725+
had already begun, without any transition delay, at the moment which
726+
would cause the new transition to finish in TE from the moment of
727+
interruption. In other words, the new transition will execute as if it
728+
started T-TE in the past.
729+
730+
<li> Use a timing function that is the portion of the curve traversed up
731+
to the moment of interruption, followed in the opposite direction
732+
(towards the starting point). This will make the transition appear as if
733+
it is playing backwards.
734+
735+
<li> Ignore any transition delay.
736+
</ol>
725737

726738
<p> For example, suppose there is a transition with a duration of two
727739
seconds. If this transition is interrupted after 0.5 seconds and the
728740
property value assigned to the original value, then the new transition
729741
effect will be the reverse of the original, as if it had begun 1.5 seconds
730742
in the past.
731743

744+
<p> Note that by using the defined from and to states for the reversing
745+
transition, it is also possible that it may reverse again, if interrupted;
746+
for example, if the transition reversing to state A was again interrupted
747+
by a property change to state B.
748+
732749
<h2 id=transition-events-><span class=secno>4 </span> Transition Events</h2>
733750

734751
<p> The completion of a CSS Transition generates a corresponding <a

css3-transitions/Overview.src.html

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -657,20 +657,37 @@ <h2 id="reversing">
657657
asymmetric. Instead, the expected behavior is that the new transition
658658
should be the reverse of what has already executed.
659659
</p>
660+
660661
<p>
661-
If a currently executing transition is interrupted and the
662-
transitioning property value is set to the original starting value for
663-
the interrupted transition, and no other transition-related properties
664-
have changed, then the new transition should be the reverse of the
665-
interrupted transition. The new transition will execute with a
666-
duration that is the elapsed time of the interrupted transition at the
667-
moment it was interrupted. The timing function for the new transition
668-
will be the portion of the curve traversed up to the point of
669-
reversal, followed in the opposite direction to the starting point.
670-
The new transition will not begin with a delay, even if one was
671-
specified. If the existing transition was interrupted during its delay
672-
period, the new transition will execute instantly.
662+
If a running transition with duration T, executing so far for duration TE,
663+
from state A, to state B, is interrupted by
664+
a property change that would start a new transition back to state A, and
665+
all the transition attributes are the same (duration, delay and timing function),
666+
then the new transition must reverse the effect. The new transition must:
673667
</p>
668+
669+
<ol>
670+
<li>
671+
Use the B and A states as its "from" and "to" states respectively. It
672+
does not use the current value as its from state, due to the rules below.
673+
</li>
674+
<li>
675+
Execute with the same duration T, but starting as if the transition had
676+
already begun, without any transition delay, at the moment which would
677+
cause the new transition to finish in TE from the moment of interruption. In other
678+
words, the new transition will execute as if it started T-TE in the past.
679+
</li>
680+
<li>
681+
Use a timing function that is the portion of the curve traversed up
682+
to the moment of interruption, followed in the opposite direction (towards
683+
the starting point). This will make the transition appear as if it
684+
is playing backwards.
685+
</li>
686+
<li>
687+
Ignore any transition delay.
688+
</li>
689+
</ol>
690+
674691
<p>
675692
For example, suppose there is a transition with a duration of two
676693
seconds. If this transition is interrupted after 0.5 seconds and the
@@ -679,6 +696,13 @@ <h2 id="reversing">
679696
1.5 seconds in the past.
680697
</p>
681698

699+
<p>
700+
Note that by using the defined from and to states for the reversing
701+
transition, it is also possible that it may reverse again, if
702+
interrupted; for example, if the transition reversing to state A was
703+
again interrupted by a property change to state B.
704+
</p>
705+
682706
<h2>
683707
Transition Events
684708
</h2>

0 commit comments

Comments
 (0)