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

Re: transitions vs. animations

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 4 Apr 2010 13:12:48 -0700
Message-ID: <z2pdd0fbad1004041312x8b93d964vf28e066f18499a25@mail.gmail.com>
To: Perry Smith <pedzsan@gmail.com>
Cc: Simon Fraser <smfr@me.com>, Anne van Kesteren <annevk@opera.com>, www-style@w3.org, Håkon Wium Lie <howcome@opera.com>
On Sun, Apr 4, 2010 at 11:23 AM, Perry Smith <pedzsan@gmail.com> wrote:
> Perhaps instead of calling them 'states' or 'state changes', call them
> 'events'.  I'm new to this list so I don't understand Håkon's statement,
> "We'd like to do this without adding an event model to CSS."  It may be that
> my way of thinking opens a can of worms that has already been discussed.
>
> First, it solves Simon's concerns because the event would not happen when a
> class is added or removed.

It doesn't solve the concerns so much as eliminate them, because it
makes transitions much weaker.  A lot of transition usage will be
based on :hover, :focus, etc., but a lot of it *won't* be.  There are
tons of places in code that I've written where I'd like to animate
some property change triggered by me swapping classes.

Simon points out, correctly, that trying to hack an event model that
responds to arbitrary selector matching changes would turn super-crazy
very quickly.  Both in terms of simple mechanics, and in terms of what
authors have to keep track of (the 'combinatorial explosion' he
mentions).

~TJ
Received on Sunday, 4 April 2010 20:13:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:26 GMT