Re: transitions vs. animations

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.

Cheers,

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Sunday, 4 April 2010 03:50:32 UTC