W3C home > Mailing lists > Public > www-style@w3.org > May 2011

Re: [css-animations] new property suggestion: animation-iteration-delay

From: Chris Marrin <cmarrin@apple.com>
Date: Tue, 24 May 2011 08:53:24 -0700
Cc: Estelle Weyl <estelle@weyl.org>, "www-style@w3.org CSS" <www-style@w3.org>, "hyatt@apple.com" <hyatt@apple.com>, Dean Jackson <dino@apple.com>
Message-id: <795828F9-CDFC-4170-A69B-47088A0B6915@apple.com>
To: Sylvain Galineau <sylvaing@microsoft.com>

On May 23, 2011, at 8:40 PM, Sylvain Galineau wrote:

>> I would prefer to write the animation this way:
>> @-webkit-animation 'showhide' {
>> 	0%,100% {opacity: 0;}
>> 	5%, 95% {opacity: 1;}
>> }
>> .showElement {
>> 	animation-name: 'showhide';
>> 	animation-duration: 2s;
>> 	animation-iteration-count: infinite;
>>        animation-iteration-delay: 8s;
>> }
>> -Estelle
>> http://standardista.com
> +1. The ability to set a delay between iterations is important. The alternative
> involves :
> 1) Updating the animation time to include delays
> 2) Create a new keyframe to represent the delay
> 3) Recalculate the % of the remaining keyframes.
> This should be built in. One shouldn't need a spreadsheet or script to handle this
> simple scenario.

- Should the delay be before the iteration is complete or after (determines when the event fires)? 
- Should the iteration delay be in addition to the initial delay or instead?
- If you're alternating, should the delay be before both the forward and reverse cycle or just the forward?
- Why not a delay between each keyframe?

You can see this quickly becomes too complex. The initial delay is there to deal with the most common case of delaying the start of an animation so you can, for instance, control a sequence of events, like the build up of a page. Everything else can (and should) be done as keyframes. I don't see your 3 alternative steps as being very difficult. A delay before, after or between keyframes is just part of the keyframe animation itself. Adding a single new property wouldn't cover enough cases and adding the properties for all possible functionality would be too complex.

I don't think we should add this property.

Received on Tuesday, 24 May 2011 15:53:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:46 UTC