Skip to content

Commit 7c4987c

Browse files
committed
2009-11-17 dino@apple.com
- added rules for reversibility of transforms
1 parent f9934b3 commit 7c4987c

File tree

3 files changed

+95
-28
lines changed

3 files changed

+95
-28
lines changed

css3-transitions/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2009-11-17 dino@apple.com
2+
3+
- added rules for reversibility of transforms
4+
15
2009-11-01 dino@apple.com
26

37
- made it clear that shorthand accepts duration before delay

css3-transitions/Overview.html

Lines changed: 52 additions & 25 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 1 November
32+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 17 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-20091101">
38+
<dd> <a href="http://www.w3.org/TR/2009/ED-css3-transitions-20091117">
3939
http://dev.w3.org/csswg/css3-transitions/</a>
40-
<!--http://www.w3.org/TR/2009/WD-css3-transitions-20091101-->
40+
<!--http://www.w3.org/TR/2009/WD-css3-transitions-20091117-->
4141

4242
<dt>Latest version:
4343

@@ -119,6 +119,9 @@ <h2 class="no-num no-toc" id=status>Status of this document</h2>
119119
W3C Patent Policy</a>.</p>
120120
<!--end-status-->
121121

122+
<p> The <a href=ChangeLog>list of changes made to this specification</a> is
123+
available.
124+
122125
<h2 class="no-num no-toc" id=contents>Table of contents</h2>
123126
<!--begin-toc-->
124127

@@ -149,23 +152,26 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
149152
class=property>transition</code>&rsquo;</span> Shorthand Property </a>
150153
</ul>
151154

152-
<li><a href="#transition-events-"><span class=secno>3 </span> Transition
155+
<li><a href="#reversing"><span class=secno>3 </span> Automatically
156+
reversing transitions </a>
157+
158+
<li><a href="#transition-events-"><span class=secno>4 </span> Transition
153159
Events </a>
154160

155-
<li><a href="#animation-of-property-types-"><span class=secno>4 </span>
161+
<li><a href="#animation-of-property-types-"><span class=secno>5 </span>
156162
Animation of property types </a>
157163

158-
<li><a href="#animatable-properties-"><span class=secno>5 </span>
164+
<li><a href="#animatable-properties-"><span class=secno>6 </span>
159165
Animatable properties </a>
160166
<ul class=toc>
161-
<li><a href="#properties-from-css-"><span class=secno>5.1 </span>
167+
<li><a href="#properties-from-css-"><span class=secno>6.1 </span>
162168
Properties from CSS </a>
163169

164-
<li><a href="#properties-from-svg-"><span class=secno>5.2 </span>
170+
<li><a href="#properties-from-svg-"><span class=secno>6.2 </span>
165171
Properties from SVG </a>
166172
</ul>
167173

168-
<li><a href="#references"><span class=secno>6 </span>References</a>
174+
<li><a href="#references"><span class=secno>7 </span>References</a>
169175
<ul class=toc>
170176
<li class=no-num><a href="#normative-references">Normative
171177
references</a>
@@ -692,17 +698,38 @@ <h3 id=the-transition-shorthand-property-><span class=secno>2.5 </span> The
692698
<td> Same as specified value.
693699
</table>
694700

695-
<div class=issue> What should happen when a value is changed midway through
696-
a transition? One option is to simply begin a new transition from the
697-
current position. However things get interesting when from/to values are
698-
being flipped. For example you'd like symmetry on fade-in/fade-out hover
699-
effects if the user rolls over the object and rolls out before the
700-
animation finishes. This implies that there needs to be a convenient and
701-
straightforward rule for running transitions in reverse under certain
702-
circumstances. This could be controlled via a new property, or could
703-
perhaps be done simply by detecting when the from/to values are flipped.</div>
704-
705-
<h2 id=transition-events-><span class=secno>3 </span> Transition Events</h2>
701+
<h2 id=reversing><span class=secno>3 </span> Automatically reversing
702+
transitions</h2>
703+
704+
<p> A common type of transition effect is when a running transition is
705+
interrupted and the property is reset to its original value. An example is
706+
a hover effect on an element, where the pointer enters and exits the
707+
element before the effect has completed. If the outgoing and incoming
708+
transitions are executed using their specified durations and timing
709+
functions, the resulting effect can be distractingly asymmetric. Instead,
710+
the expected behavior is that the new transition should be the reverse of
711+
what has already executed.
712+
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.
725+
726+
<p> For example, suppose there is a transition with a duration of two
727+
seconds. If this transition is interrupted after 0.5 seconds and the
728+
property value assigned to the original value, then the new transition
729+
effect will be the reverse of the original, as if it had begun 1.5 seconds
730+
in the past.
731+
732+
<h2 id=transition-events-><span class=secno>4 </span> Transition Events</h2>
706733

707734
<p> The completion of a CSS Transition generates a corresponding <a
708735
href="http://www.w3.org/TR/DOM-Level-2-Events/events.html">DOM Event</a>.
@@ -845,7 +872,7 @@ <h2 id=transition-events-><span class=secno>3 </span> Transition Events</h2>
845872
</ul>
846873
</dl>
847874

848-
<h2 id=animation-of-property-types-><span class=secno>4 </span> Animation
875+
<h2 id=animation-of-property-types-><span class=secno>5 </span> Animation
849876
of property types</h2>
850877

851878
<p> The following describes how each property type undergoes transition or
@@ -899,10 +926,10 @@ <h2 id=animation-of-property-types-><span class=secno>4 </span> Animation
899926
property was individually specified.
900927
</ul>
901928

902-
<h2 id=animatable-properties-><span class=secno>5 </span> Animatable
929+
<h2 id=animatable-properties-><span class=secno>6 </span> Animatable
903930
properties</h2>
904931

905-
<h3 id=properties-from-css-><span class=secno>5.1 </span> Properties from
932+
<h3 id=properties-from-css-><span class=secno>6.1 </span> Properties from
906933
CSS</h3>
907934

908935
<table>
@@ -1163,7 +1190,7 @@ <h3 id=properties-from-css-><span class=secno>5.1 </span> Properties from
11631190
<td>number
11641191
</table>
11651192

1166-
<h3 id=properties-from-svg-><span class=secno>5.2 </span> Properties from
1193+
<h3 id=properties-from-svg-><span class=secno>6.2 </span> Properties from
11671194
SVG</h3>
11681195

11691196
<p> All properties defined as animatable in the SVG specification, provided
@@ -1210,7 +1237,7 @@ <h3 id=properties-from-svg-><span class=secno>5.2 </span> Properties from
12101237
</tr>
12111238
</table> -->
12121239

1213-
<h2 id=references><span class=secno>6 </span>References</h2>
1240+
<h2 id=references><span class=secno>7 </span>References</h2>
12141241

12151242
<h3 class=no-num id=normative-references>Normative references</h3>
12161243
<!--begin-normative-->

css3-transitions/Overview.src.html

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ <h2 class="no-num no-toc" id="abstract">Abstract</h2>
6464
<h2 class="no-num no-toc" id="status">Status of this document</h2>
6565
<!--status-->
6666

67+
<p>
68+
The <a href="ChangeLog">list of changes made to this specification</a> is
69+
available.
70+
</p>
6771

6872
<h2 class="no-num no-toc" id="contents">Table of contents</h2>
6973
<!--toc-->
@@ -639,9 +643,41 @@ <h3>
639643
</tr>
640644
</tbody>
641645
</table>
642-
<div class="issue">
643-
What should happen when a value is changed midway through a transition? One option is to simply begin a new transition from the current position. However things get interesting when from/to values are being flipped. For example you'd like symmetry on fade-in/fade-out hover effects if the user rolls over the object and rolls out before the animation finishes. This implies that there needs to be a convenient and straightforward rule for running transitions in reverse under certain circumstances. This could be controlled via a new property, or could perhaps be done simply by detecting when the from/to values are flipped.
644-
</div>
646+
647+
<h2 id="reversing">
648+
Automatically reversing transitions
649+
</h2>
650+
<p>
651+
A common type of transition effect is when a running transition is
652+
interrupted and the property is reset to its original value. An
653+
example is a hover effect on an element, where the pointer enters and
654+
exits the element before the effect has completed. If the outgoing and
655+
incoming transitions are executed using their specified durations and
656+
timing functions, the resulting effect can be distractingly
657+
asymmetric. Instead, the expected behavior is that the new transition
658+
should be the reverse of what has already executed.
659+
</p>
660+
<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.
673+
</p>
674+
<p>
675+
For example, suppose there is a transition with a duration of two
676+
seconds. If this transition is interrupted after 0.5 seconds and the
677+
property value assigned to the original value, then the new transition
678+
effect will be the reverse of the original, as if it had begun
679+
1.5 seconds in the past.
680+
</p>
645681

646682
<h2>
647683
Transition Events

0 commit comments

Comments
 (0)