<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Inconsistent Transitions</title>
	<atom:link href="http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/feed/" rel="self" type="application/rss+xml" />
	<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/</link>
	<description>Things that Eric A. Meyer, CSS expert, writes about on his personal Web site; it&#039;s largely Web standards and Web technology, but also various bits of culture, politics, personal observations, and other miscellaneous stuff</description>
	<lastBuildDate>Tue, 18 Jun 2013 15:30:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: AlastairC</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-547846</link>
		<dc:creator>AlastairC</dc:creator>
		<pubDate>Sun, 03 Apr 2011 12:27:43 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-547846</guid>
		<description><![CDATA[As a side note, webkit seems to apply the transformation to changes in text size on the second example, but not the first.]]></description>
		<content:encoded><![CDATA[<p>As a side note, webkit seems to apply the transformation to changes in text size on the second example, but not the first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Divya Manian</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-547310</link>
		<dc:creator>Divya Manian</dc:creator>
		<pubDate>Thu, 31 Mar 2011 15:49:35 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-547310</guid>
		<description><![CDATA[Eric, Opera&#039;s behaviour will be updated to match the behavior specified in the spec soon.]]></description>
		<content:encoded><![CDATA[<p>Eric, Opera&#8217;s behaviour will be updated to match the behavior specified in the spec soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Some links for light reading (31/3/11) &#124; Max Design</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-547266</link>
		<dc:creator>Some links for light reading (31/3/11) &#124; Max Design</dc:creator>
		<pubDate>Thu, 31 Mar 2011 10:05:45 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-547266</guid>
		<description><![CDATA[[...] Inconsistent Transitions [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Inconsistent Transitions [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546615</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Sun, 27 Mar 2011 13:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546615</guid>
		<description><![CDATA[Thanks, &lt;a href=&quot;http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546564&quot; rel=&quot;nofollow&quot;&gt;David&lt;/a&gt;!  If I understand you correctly, that makes Opera incorrect going forward (not backward) on the first test case, and all the browsers I mentioned correct on the second case.  Right?

Also, if a transition is only specified for the always-present style, then it would apply in both directions assuming no interruption, right?  This is, given:

&lt;code&gt;a[href] {transition: 2s all;}
a[href]:hover {transform: rotate(180deg);}&lt;/code&gt;

…it would take two seconds to rotate on hover and the same two seconds to rotate back on un-hover, because the same transition would apply to both states.  If I specified a different transition on the hover state, it would apply when &lt;em&gt;un&lt;/em&gt;-hovering, not hovering.  (And if the rotation on hover is interrupted, it should unspool in T-TE time, not take the full two seconds.)  Right?

Obviously I need to add cases to test transitions in both directions and on only un-hover to see how much consistency exists.  Plus at least two more that test reversal time for interrupted animations.

Fun fun fun!]]></description>
		<content:encoded><![CDATA[<p>Thanks, <a href="http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546564" rel="nofollow">David</a>!  If I understand you correctly, that makes Opera incorrect going forward (not backward) on the first test case, and all the browsers I mentioned correct on the second case.  Right?</p>
<p>Also, if a transition is only specified for the always-present style, then it would apply in both directions assuming no interruption, right?  This is, given:</p>
<p><code>a[href] {transition: 2s all;}<br />
a[href]:hover {transform: rotate(180deg);}</code></p>
<p>…it would take two seconds to rotate on hover and the same two seconds to rotate back on un-hover, because the same transition would apply to both states.  If I specified a different transition on the hover state, it would apply when <em>un</em>-hovering, not hovering.  (And if the rotation on hover is interrupted, it should unspool in T-TE time, not take the full two seconds.)  Right?</p>
<p>Obviously I need to add cases to test transitions in both directions and on only un-hover to see how much consistency exists.  Plus at least two more that test reversal time for interrupted animations.</p>
<p>Fun fun fun!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Baron</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546565</link>
		<dc:creator>David Baron</dc:creator>
		<pubDate>Sun, 27 Mar 2011 06:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546565</guid>
		<description><![CDATA[The relevant section of the spec on the testcase here is the section on &lt;a href=&quot;http://dev.w3.org/csswg/css3-transitions/#starting&quot; rel=&quot;nofollow&quot;&gt;starting of transitions&lt;/a&gt;.  The point of the first sentence of that section is that the transition properties after the style change that triggers the transition are what matter.  (I should probably add an example after that sentence...)

This means that the snap-back behavior is correct.  It also means that, if you want, you can use different timing functions for the &quot;forwards&quot; and &quot;backwards&quot; directions, but putting the timing function for the &quot;forwards&quot; direction on the :hover style and the &quot;backwards&quot; one on the style that&#039;s always present.]]></description>
		<content:encoded><![CDATA[<p>The relevant section of the spec on the testcase here is the section on <a href="http://dev.w3.org/csswg/css3-transitions/#starting" rel="nofollow">starting of transitions</a>.  The point of the first sentence of that section is that the transition properties after the style change that triggers the transition are what matter.  (I should probably add an example after that sentence&#8230;)</p>
<p>This means that the snap-back behavior is correct.  It also means that, if you want, you can use different timing functions for the &#8220;forwards&#8221; and &#8220;backwards&#8221; directions, but putting the timing function for the &#8220;forwards&#8221; direction on the :hover style and the &#8220;backwards&#8221; one on the style that&#8217;s always present.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: François Nonnenmacher</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546564</link>
		<dc:creator>François Nonnenmacher</dc:creator>
		<pubDate>Sun, 27 Mar 2011 06:19:32 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546564</guid>
		<description><![CDATA[The two examples behave exactly the same in my copy of Safari, Version 5.0.4 (6533.20.27) on Mac OS X 10.6.7 (i.e. the behavior you describe for the second span). However, when viewed in NetNewsWire (hence WebKit too but not Safari), the first span indeed snaps back to its position instantly on un-hovering.]]></description>
		<content:encoded><![CDATA[<p>The two examples behave exactly the same in my copy of Safari, Version 5.0.4 (6533.20.27) on Mac OS X 10.6.7 (i.e. the behavior you describe for the second span). However, when viewed in NetNewsWire (hence WebKit too but not Safari), the first span indeed snaps back to its position instantly on un-hovering.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dougwig</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546534</link>
		<dc:creator>dougwig</dc:creator>
		<pubDate>Sun, 27 Mar 2011 01:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546534</guid>
		<description><![CDATA[Interesting. Cedarholm&#039;s CSS3 ABA book examples have the transition on the bare element, and I&#039;m getting used to that now.]]></description>
		<content:encoded><![CDATA[<p>Interesting. Cedarholm&#8217;s CSS3 ABA book examples have the transition on the bare element, and I&#8217;m getting used to that now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546478</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Sat, 26 Mar 2011 17:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546478</guid>
		<description><![CDATA[To everyone who feels the &quot;snap back&quot; behavior is correct, I&#039;m not sure I agree.  The section on &lt;a href=&quot;http://www.w3.org/TR/css3-transitions/#reversing&quot; rel=&quot;nofollow&quot;&gt;Automatically reversing transitions&lt;/a&gt; seems to me to be written so that any animated transition should be smoothly reversed.  It may interact with the rules on link states in some unexpected ways, but it seems to me the rotation should just be unwound.

Of course, I&#039;ve since found that both Opera and Webkit apparently ignore point 2 in that section (&quot;Execute with the same duration T, but starting as if the transition had already begun…&quot;) and run the reversal in T time, not T-TE time.  Thus, if you start a 60 second rotation and abort it 10 seconds in, they take 60 seconds to rotate back to the starting point, not 10.  Gecko does not suffer this failing.

So yeah, CSS transitions.  Kind of a mess.]]></description>
		<content:encoded><![CDATA[<p>To everyone who feels the &#8220;snap back&#8221; behavior is correct, I&#8217;m not sure I agree.  The section on <a href="http://www.w3.org/TR/css3-transitions/#reversing" rel="nofollow">Automatically reversing transitions</a> seems to me to be written so that any animated transition should be smoothly reversed.  It may interact with the rules on link states in some unexpected ways, but it seems to me the rotation should just be unwound.</p>
<p>Of course, I&#8217;ve since found that both Opera and Webkit apparently ignore point 2 in that section (&#8220;Execute with the same duration T, but starting as if the transition had already begun…&#8221;) and run the reversal in T time, not T-TE time.  Thus, if you start a 60 second rotation and abort it 10 seconds in, they take 60 seconds to rotate back to the starting point, not 10.  Gecko does not suffer this failing.</p>
<p>So yeah, CSS transitions.  Kind of a mess.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546476</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Sat, 26 Mar 2011 17:27:40 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546476</guid>
		<description><![CDATA[&lt;a href=&quot;http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546218&quot; rel=&quot;nofollow&quot;&gt;Patrick&lt;/a&gt;, it doesn&#039;t make sense to me that the transition should be ignored if it&#039;s defined on the hover state.  For example:

&lt;code&gt;
a[href]:hover {transform: rotate(90deg); color: red; transition: 1s all;}
a[href]:focus {transform: skewX(-10deg); color: yellow; outline: 1px dotted green; transition: 2s all;}
&lt;/code&gt;

...reads to me as &quot;On hover, do a 90-degree transform, color the link red, and take one second to do both.  On focus, skew minus 10 degrees, color the link yellow, bring in a dotted green outline, and take two seconds to do all three.&quot;

Forcing the transition onto the default state means that all transitions are the same length.  Allowing it on states, as Webkit and Gecko do, means you can vary lengths depending on the state.  (Not to mention all the other transition-related properties.)

Unless the specification says somewhere that transitions are ignored in such cases, Opera seems to be in the wrong.  And if the specification &lt;em&gt;does&lt;/em&gt; say that, I&#039;d argue that it&#039;s flawed and should be fixed.]]></description>
		<content:encoded><![CDATA[<p><a href="http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546218" rel="nofollow">Patrick</a>, it doesn&#8217;t make sense to me that the transition should be ignored if it&#8217;s defined on the hover state.  For example:</p>
<p><code><br />
a[href]:hover {transform: rotate(90deg); color: red; transition: 1s all;}<br />
a[href]:focus {transform: skewX(-10deg); color: yellow; outline: 1px dotted green; transition: 2s all;}<br />
</code></p>
<p>&#8230;reads to me as &#8220;On hover, do a 90-degree transform, color the link red, and take one second to do both.  On focus, skew minus 10 degrees, color the link yellow, bring in a dotted green outline, and take two seconds to do all three.&#8221;</p>
<p>Forcing the transition onto the default state means that all transitions are the same length.  Allowing it on states, as Webkit and Gecko do, means you can vary lengths depending on the state.  (Not to mention all the other transition-related properties.)</p>
<p>Unless the specification says somewhere that transitions are ignored in such cases, Opera seems to be in the wrong.  And if the specification <em>does</em> say that, I&#8217;d argue that it&#8217;s flawed and should be fixed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Gresley</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546230</link>
		<dc:creator>Alan Gresley</dc:creator>
		<pubDate>Fri, 25 Mar 2011 06:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546230</guid>
		<description><![CDATA[The timing of a transition does not work if you are also transforming. To see this, make the transition 5s and you will note that the transforms still snap. Just early days yet.

I do recommend that you have one set of transitions of hover and another see of transitions on hover out since hovering out will also cause a snap.]]></description>
		<content:encoded><![CDATA[<p>The timing of a transition does not work if you are also transforming. To see this, make the transition 5s and you will note that the transforms still snap. Just early days yet.</p>
<p>I do recommend that you have one set of transitions of hover and another see of transitions on hover out since hovering out will also cause a snap.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick H. Lauke</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546218</link>
		<dc:creator>Patrick H. Lauke</dc:creator>
		<pubDate>Fri, 25 Mar 2011 04:07:37 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546218</guid>
		<description><![CDATA[though the spec doesn&#039;t say so explicitly, as far as i can tell, i always understood the transition property to be used to &quot;prime&quot; an element for a transition that&#039;s going to happen later. in your first test this priming and the transform happen effectively at the same time, so Opera&#039;s behaviour seems more logical to me. then again, you could say i&#039;m biased ;)]]></description>
		<content:encoded><![CDATA[<p>though the spec doesn&#8217;t say so explicitly, as far as i can tell, i always understood the transition property to be used to &#8220;prime&#8221; an element for a transition that&#8217;s going to happen later. in your first test this priming and the transform happen effectively at the same time, so Opera&#8217;s behaviour seems more logical to me. then again, you could say i&#8217;m biased ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vapour</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546203</link>
		<dc:creator>vapour</dc:creator>
		<pubDate>Fri, 25 Mar 2011 01:48:37 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546203</guid>
		<description><![CDATA[mouseleave
div span {
	transition: 3s transform;
}
mouseenter
div:hover span {
	transform: rotate(270deg);
	transition: 1s transform;
}]]></description>
		<content:encoded><![CDATA[<p>mouseleave<br />
div span {<br />
	transition: 3s transform;<br />
}<br />
mouseenter<br />
div:hover span {<br />
	transform: rotate(270deg);<br />
	transition: 1s transform;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Evans</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546195</link>
		<dc:creator>Dan Evans</dc:creator>
		<pubDate>Fri, 25 Mar 2011 01:05:20 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546195</guid>
		<description><![CDATA[I actually find this to be very intuitive once I think about it. If the transition property is declared only for the :hover state then as soon as you mouseout the span no longer is in that state and so no longer has that property and so should not transition. 

Another interesting test-case could be to create another parent div surrounding the first with some padding (so it&#039;s actually a larger surface). Then put the transform on the outer div:hover and the transition on the inner div:hover (both still applying to the span ultimately). As you mouseover you have to pass over the outer div before the inner div. I predict this will cause the transition to never be applied and it will snap into place both ways. 

An interesting Venn Diagram intersection could also be created that allowed every possibility of animate/don&#039;t animate on mousein/mouseout depending on the path the user&#039;s mouse takes across it.]]></description>
		<content:encoded><![CDATA[<p>I actually find this to be very intuitive once I think about it. If the transition property is declared only for the :hover state then as soon as you mouseout the span no longer is in that state and so no longer has that property and so should not transition. </p>
<p>Another interesting test-case could be to create another parent div surrounding the first with some padding (so it&#8217;s actually a larger surface). Then put the transform on the outer div:hover and the transition on the inner div:hover (both still applying to the span ultimately). As you mouseover you have to pass over the outer div before the inner div. I predict this will cause the transition to never be applied and it will snap into place both ways. </p>
<p>An interesting Venn Diagram intersection could also be created that allowed every possibility of animate/don&#8217;t animate on mousein/mouseout depending on the path the user&#8217;s mouse takes across it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan A</title>
		<link>http://meyerweb.com/eric/thoughts/2011/03/24/inconsistent-transitions/#comment-546167</link>
		<dc:creator>Ryan A</dc:creator>
		<pubDate>Thu, 24 Mar 2011 20:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1499#comment-546167</guid>
		<description><![CDATA[This actually looks like Gecko and Webkit got it right. 

When the transition is attached to the span it&#039;s like saying &#039;change your properties to whatever the effective values are in a 1sec timeframe&#039;. 
So, because in the second case that transition property is always attached, the property changes are affected by the transition in both direction (hover on/off). But in the first case that transition is only attached when the div is :hover&#039;d, so when the element isn&#039;t hovered the transition is removed, and the other properties change instantly (no transition to follow).

Off the top of my head it sounds like useful behavior as you can have different transitions for transitioning in/out of a state. Combining the examples:
&lt;code&gt;
div span {
   transition: 3s transform;   /* transition on blur slowly */
}
div:hover span {
   transition: 1s transform;   /* transition on :hover fast */
   transform: rotate(270deg);
}
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>This actually looks like Gecko and Webkit got it right. </p>
<p>When the transition is attached to the span it&#8217;s like saying &#8216;change your properties to whatever the effective values are in a 1sec timeframe&#8217;.<br />
So, because in the second case that transition property is always attached, the property changes are affected by the transition in both direction (hover on/off). But in the first case that transition is only attached when the div is :hover&#8217;d, so when the element isn&#8217;t hovered the transition is removed, and the other properties change instantly (no transition to follow).</p>
<p>Off the top of my head it sounds like useful behavior as you can have different transitions for transitioning in/out of a state. Combining the examples:<br />
<code><br />
div span {<br />
   transition: 3s transform;   /* transition on blur slowly */<br />
}<br />
div:hover span {<br />
   transition: 1s transform;   /* transition on :hover fast */<br />
   transform: rotate(270deg);<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->