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

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

From: L. David Baron <dbaron@dbaron.org>
Date: Sun, 6 Nov 2011 11:27:17 -0800
To: Lea Verou <leaverou@gmail.com>
Cc: www-style list <www-style@w3.org>
Message-ID: <20111106192717.GA25290@pickering.dbaron.org>
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 GMT

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