Re: transitions vs. animations

On Tue, Apr 6, 2010 at 12:07 PM, Lars Gunther <gunther@keryx.se> wrote:
> 2010-04-06 20:39, Tab Atkins Jr. skrev:
>>
>> Short answer: no, it has nothing to do with events.
>
> :focus + on-entry eq. onfocus
> :focus + on-exit  eq. onblur
> :hover + on-entry eq. onmouseenter
> :hover + on-exit  eq. onmouseleave
>
> This seems an awful lot like events to me. The very fact that you proposed a
> property called "on" makes the thought not that far fetched, IMO.

That was Hakon with the on-entry, on-exit thing.

But no, it still has nothing to do with events.  It uses precisely the
same method to determine when to run an animation as the current draft
does.  All it does is (a) make the difference between an 'entry' and
'while' animation explicit, and slightly tweaks the "when do you run?"
method to allow for a sensible "exit" type of animation.

Using :focus and :hover is, of course, doing something event-ish,
since they are in practice based directly on relevant DOM events.  If
you check out the actual details of my proposal, though, it has
nothing to do with events, and does not suffer from the weaknesses we
have brought up with an event-based model.

>> An event-based
>> animation model in CSS is a bad idea.
>
> Agreed. Like Don Quijote I have been trying to suggest that animations
> belong in the DOM for a while now...

We don't agree on this.

~TJ

Received on Tuesday, 6 April 2010 20:02:47 UTC