W3C home > Mailing lists > Public > www-style@w3.org > December 2009

Re: [css3-transitions] faster reversing of partially completed transitions

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 28 Dec 2009 13:43:20 -0500
To: www-style@w3.org
Message-ID: <20091228184320.GA8442@pickering.dbaron.org>
On Tuesday 2009-11-24 13:51 -0800, L. David Baron wrote:
> If we don't do that, the question is what to do instead.  I can
> think of a two other possibilities:
> 
> (1) shorten the transition-duration (and any negative
>     transition-delay) by the ratio of the time elapsed so far in the
>     initial transition to the total time of that transition (much
>     like what I did above, except using time instead of distance)

I tried implementing this, and it looked horrible because the
reversed transition often appeared at a very different speed from
the forward one.

However, doing something *more* similar to what I original
implemented (i.e., producing the exact same results for the
exact-reversal cases and just avoiding doing any shortening for
other cases) seems to have worked fine:

 (1a) shorten the transition-duration (and any negative
      transition-delay) by the current value of the timing function
      of the transition in progress

This looked fine.

> (2) jump to the point in the timing function (at the specified
>     transition-duration) for the reverse transition that would have
>     the element at its current position (and thus ignore
>     transition-delay entirely)

I tried implementing this, and it also looked horrible (due to
unexpected jumpiness).



My proposal (1a) has the advantage, relative to what's currently in
the draft, that it doesn't have a discontinuity regarding timing
function reversing behavior between the user moving the mouse out of
a transition-on-:hover when the transition is 99% complete and after
it is complete.

It has the disadvantage, relative to what's currently in the draft,
that multiple transitions with the same duration but different
timing functions would reverse in different amounts of time.  (This
could be an issue if different timing functions are used for
different properties in the same transition.)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Monday, 28 December 2009 18:43:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:47:12 GMT