- From: François REMY <fremycompany_pub@yahoo.fr>
- Date: Fri, 3 Feb 2012 17:49:07 +0100
- To: "CSS 3 W3C Group" <www-style@w3.org>
To me, it seems reasonable that an animation could propose its own default timing options. When you build an animation, you clearly know which time frame you target. After that, there may be some variations, but clearly that should remain the exception. Having just to set : @keyframes myFirstAnim (duration: 1s, other-option: 2) { ... } @keyframes mySecondAnim (duration: 1s, other-option: 2) { ... } selector { animation: myFirstAnim, mySecondAnim; } would be perfectly fine. Then, you could override the default behavior if you really need it : selector { animation: myFirstName 2s, mySecondAnim 0.5s; } but, usually, this is not the kind of things you would like to do. I used animations quite a lot when doing WPF/Silverlight, I never defined the timing anywhere else than in the storyboard : <DoubleAnimation From="1.0" To="0.0" Duration="0:0:5" /> An animation is calibrated for a specific timing and if your designer decides to change the timing of the animation (because he's adding or removing steps, for example), it should be possible to do it *inside the keyframes/storyboard* and not by searching the whole css if there's somewhere a rule that will impact the timing. If I go to the end of my reasoning, I would even allow the animation-duration property to take a percentage as a value. That way, you can define an acceleration or a slow down relatively to the initial timing, and if the @keyframe timing change, the durations remains proportionnal to the new default value. @keyframes moveCar { options: { duration: 1s } ... } img.car { animation: moveCar; } img.old.car { animation-duration: 120%; } At a later date, I can change the 'moveCar' duration to 2s and have the old cars still be 20% slower than normal cars. Best regards, François -----Message d'origine----- From: Tab Atkins Jr. Sent: Friday, February 03, 2012 3:54 PM To: Daniel Glazman Cc: www-style@w3.org Subject: Re: [css3-animations] Editability of CSS 3 Animations On Fri, Feb 3, 2012 at 6:48 AM, Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote: > Le 03/02/12 15:41, Tab Atkins Jr. a écrit : >> Can't you just make up some reasonable defaults? Or, if you want to > > Unfortunately no. The default value for animation-duration being 0, > it's just impossible to do that? I meant make up some reasonable defaults *for the purpose of previewing*. You even suggest that perhaps 1s would be a good default duration. Just use that in your preview to show the general effects of the keyframes while people are editting them. Obviously, if someone is editting the application of an animation to an element, you should use the values specified on that element. But I gathered from your post that the main problem was previewing keyframes. ~TJ
Received on Friday, 3 February 2012 16:49:34 UTC