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

Re: transitions vs. animations

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 6 Apr 2010 09:42:35 -0700
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Chris Marrin <cmarrin@apple.com>, "www-style@w3.org list" <www-style@w3.org>
Message-Id: <E254B0DF-8E99-43E1-BA38-C102C6D6D7BF@gmail.com>
To: Simon Fraser <smfr@me.com>

On Apr 6, 2010, at 8:59 AM, Simon Fraser wrote:

> On Apr 5, 2010, at 11:07 PM, Brad Kemper wrote:
> 
>> transition: left 1s play(bounce 1s infinite);
> 
> There's a problem linking animations with transitions that hasn't been mentioned yet. What do you expect to happen in this case:
> 
> .button {
>  left: 100px;
>  transition: left 1s play(bounce 1s);
> }
> 
> .button:hover {
>  left: 100px;
> }
> 
> Here, left isn't changing on :hover, so the transition wouldn't run, and thus nor would the bounce animation. Is that what you want?

Yes, that is reasonable. Since you are only looking at the computed value to determine if there is a transition, then I couldn't get it to bounce by using 'left:100.0001px', right? (an admittedly hacky solution, at best)

> Controllable animations are still desired for this use case.

Hmm. It means we still can't get a bounce on just hovering and unhovering though, right? On the other hand, I could still pick a property where a very small change would be unnoticeable (especially on a bouncing object). For instance:

.button {
 opacity:1;
 transition: opacity 1s play(bounce 1s);
}

.button:hover {
 opacity: .999;
}


Received on Tuesday, 6 April 2010 16:43:13 GMT

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