W3C home > Mailing lists > Public > www-style@w3.org > April 2010

Re: transitions vs. animations

From: Håkon Wium Lie <howcome@opera.com>
Date: Sun, 4 Apr 2010 05:49:56 +0200
Message-ID: <19384.3172.3648.385410@gargle.gargle.HOWL>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style@w3.org
Also sprach Tab Atkins Jr.:

 > > [example 9]

 > > [example 10]

 > The two examples aren't equivalent.  The element has be in a
 > 'transition-ready' state when the property that you're transitioning
 > "starts to change".  Your first example transitions color both ways,
 > but your second only transitions when the element is in :hover and the
 > color changes (possibly through losing :hover, since the "starts to
 > change" bit happens before :hover is actually lost).

Indeed, the two are different. 

 > Don't know how this might affect the effect proposal, or if there are
 > any implications of changing the model as you describe (where, I
 > think, having the effect set on either the starting or ending state
 > works?).

It doesn't change the 'effect' proposal.

But your question is interesting. 

It's quite intuitive what the 'on-entry' and 'on-exit' means for the
hover state:

  .blue-box:hover {
    effect: on-entry do(bounce) 1s, on-exit do(bounce) 1s;

And for, say, active:

  .blue-box:active {
    effect: on-entry do(bounce) 1s, on-exit do(bounce) 1s;

However, we also need to define what 'on-entry' and 'on-exit' mean on
"stateless" elements.


              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Sunday, 4 April 2010 03:50:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:33 UTC