Skip to content

Commit 2d2811b

Browse files
committed
Give an example in the 'Starting of transitions' section. The discussion in http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/ suggests an example is needed here.
1 parent b38ce1e commit 2d2811b

2 files changed

Lines changed: 49 additions & 11 deletions

File tree

css3-transitions/Overview.html

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929

3030
<h1>CSS Transitions</h1>
3131

32-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 26 March 2011</h2>
32+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 27 March 2011</h2>
3333

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

37-
<dd> <a href="http://www.w3.org/TR/2011/ED-css3-transitions-20110326">
37+
<dd> <a href="http://www.w3.org/TR/2011/ED-css3-transitions-20110327">
3838
http://dev.w3.org/csswg/css3-transitions/</a>
39-
<!--http://www.w3.org/TR/2011/WD-css3-transitions-20110326-->
39+
<!--http://www.w3.org/TR/2011/WD-css3-transitions-20110327-->
4040

4141
<dt>Latest version:
4242

@@ -794,13 +794,33 @@ <h2 id=starting><span class=secno>3. </span> Starting of transitions</h2>
794794
class=property>transition-timing-function</code></a>&rsquo;, and &lsquo;<a
795795
href="#transition-delay"><code
796796
class=property>transition-delay</code></a>&rsquo; properties at the time
797-
the animatable property would first have its new computed value. Since
798-
this specification does not define when computed values change, and thus
799-
what changes to computed values are considered simultaneous, authors
800-
should be aware that changing any of the transition properties a small
801-
amount of time after making a change that might transition can result in
802-
behavior that varies between implementations, since the changes might be
803-
considered simultaneous in some implementations but not others.
797+
the animatable property would first have its new computed value.
798+
799+
<div class=example>
800+
<p style="display:none"> Example(s):</p>
801+
802+
<pre>li { transition: background-color linear 1s; background: blue; }
803+
li:hover { transition-duration: 2s; background-color: green; }</pre>
804+
805+
<p> When a list item with these style rules enters the :hover state, the
806+
computed &lsquo;<a href="#transition-duration"><code
807+
class=property>transition-duration</code></a>&rsquo; at the time that
808+
&lsquo;<code class=property>background-color</code>&rsquo; would have its
809+
new value (&lsquo;<code class=property>green</code>&rsquo;) is
810+
&lsquo;<code class=css>2s</code>&rsquo;, so the transition from
811+
&lsquo;<code class=property>blue</code>&rsquo; to &lsquo;<code
812+
class=property>green</code>&rsquo; takes 2 seconds. However, when the
813+
list item leaves the :hover state, the transition from &lsquo;<code
814+
class=property>green</code>&rsquo; to &lsquo;<code
815+
class=property>blue</code>&rsquo; takes 1 second.</p>
816+
</div>
817+
818+
<p> Since this specification does not define when computed values change,
819+
and thus what changes to computed values are considered simultaneous,
820+
authors should be aware that changing any of the transition properties a
821+
small amount of time after making a change that might transition can
822+
result in behavior that varies between implementations, since the changes
823+
might be considered simultaneous in some implementations but not others.
804824

805825
<p class=note>Say something about simulaneity
806826

css3-transitions/Overview.src.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,25 @@ <h2 id="starting">
743743
the values of the 'transition-property', 'transition-duration',
744744
'transition-timing-function', and 'transition-delay' properties
745745
at the time the animatable property would first have its new
746-
computed value. Since this specification does not define
746+
computed value.
747+
</p>
748+
<div class="example">
749+
<p style="display:none">
750+
Example(s):
751+
</p>
752+
<pre>li { transition: background-color linear 1s; background: blue; }
753+
li:hover { transition-duration: 2s; background-color: green; }</pre>
754+
<p>
755+
When a list item with these style rules enters the :hover
756+
state, the computed 'transition-duration' at the time that
757+
'background-color' would have its new value ('green') is '2s',
758+
so the transition from 'blue' to 'green' takes 2 seconds.
759+
However, when the list item leaves the :hover state, the
760+
transition from 'green' to 'blue' takes 1 second.
761+
</p>
762+
</div>
763+
<p>
764+
Since this specification does not define
747765
when computed values change, and thus what changes to
748766
computed values are considered simultaneous,
749767
authors should be aware that changing any of the transition

0 commit comments

Comments
 (0)