Re: [css3-animations] animation-direction: reverse

On Sunday 2011-11-06 11:51 +0200, Lea Verou wrote:
> Currently, animation-direction only accepts 2 values: normal and alternate.
> http://dev.w3.org/csswg/css3-animations/#animation-direction
> 
> I think it would be useful and quite easy for implementors to also
> add "reverse" which would do the same as alternate for all
> iterations, not only for even ones. It would help make animations
> more reusable. For example, I had to use 2 different animations
> here: http://jsfiddle.net/leaverou/zXPzY/
> If animation-direction supported reverse, I would only have to use one.
> 
> And it also helps make the syntax more symmetrical and thus, less
> unexpected.

It's easy enough to implement, if it's desirable and we have a good
name for it (i.e., doesn't lead to confusion).

However, I'd note that there's also a fourth value that may be
desirable:  an opposite of 'alternate', which would go forwards on
even iterations and reverse on odd iterations.  ('alternate' goes
forwards on odd iterations and backwards on even ones.)  I suspect
'reverse-alternate' is not a very good name, though.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Sunday, 6 November 2011 19:27:44 UTC