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

Re: [css3-transitions] supporting 'transition-delay' on non-animatable properties?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 28 Nov 2009 12:33:52 -0600
Message-ID: <dd0fbad0911281033y7d8cc19bg780162dffb18a44f@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: www-style <www-style@w3.org>
On Sat, Nov 28, 2009 at 12:04 PM, L. David Baron <dbaron@dbaron.org> wrote:
> Currently
> http://www.w3.org/TR/css3-transitions/#animation-of-property-types-
> has a special case for the animation of 'visibility' to allow
> authors to perform certain special effects, such as hiding elements
> at a certain time after a transition starts.
>
> In https://bugzilla.mozilla.org/show_bug.cgi?id=521890#c4 Justin
> Dolske (who was converting the animations in our videocontrols for
> HTML5 video to transitions) suggested that perhaps
> 'transition-delay' could apply to all properties, not only those
> that are animatable.
>
> This would be relatively straightforward for us to implement, and
> would give authors significantly more flexibility in handling
> transitions of non-animatable properties that they want to happen at
> the end of a transition of animatable properties.  (And, in
> particular, they could use 'display', which often has better
> performance characteristics when large amounts of content are
> hidden.)
>
> If we did this, though, we may (or may not) want to remove the
> exception for visibility.  Removing the exception would require
> adding a transition-delay for visibility using the trick for getting
> reversing transitions, e.g.:
>  p { visibility: hidden; }
>  p.shown { visibility: visibile; }
>  p.shown { transition: visibility 0 1s; } /* not specified for p */
> which would likely make the 'transition' property more complicated
> when combined with other properties.
>
> Do people think this would be useful, and are other implementors
> interested?

I think it would be quite useful, for precisely the reason you give -
it would let us easily time the changeover of non-animatable
properties to match up with the animations of other properties.

Having to manually set delays for the visibility property is
acceptable to me.  It gives more flexibility in any case - you can
have the switchover happen at either the beginning or the end as
appropriate.

~TJ
Received on Saturday, 28 November 2009 18:34:20 GMT

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