Re: [css3-animations] display:none, visibility:hidden and animations

On Mon, Oct 3, 2011 at 8:52 AM, Sylvain Galineau <sylvaing@microsoft.com>wrote:

>
> [Boris Zbarsky:]
> >
> > On 10/3/11 11:41 AM, Sylvain Galineau wrote:
> > > Note that animating to/from display:none was not the original question
> > > (though it's also worth discussing).
> > > The question is: given animations applied to element E and/or its
> > > descendants, what is the effect of making E display:none on these
> > > animations ?
> >
> > OK; that's a very different question from the one I was worrying about,
> > which was "Can a page start an animation on an element that is
> > display:none or on its descendants?"....
> >
> > -Boris
> Actually, that is also part of the question so allow me to expand on the
> issues
> I'd like to resolve:
>
> 1. Given an animation A currently running on E, what is the effect on A of
> giving E
> display:none ?
>

E and all its children should should be removed from the display.
Animations and transitions on the children stop and go to their initial
state.


> 2. Given an element E with display:none, what is the effect of applying an
> animation
> A to E ? What happens when E is given non-none display after A is applied ?
> Specifically,
> when the element is given a visible display less t seconds of the animation
> being applied,
> with t being the animation's duration ?
>

I would expect that 1s animation to start after making the element visible
and run for 1s.


> 3. Given an animation A currently running on a descendent of E, what is the
> effect on A of
> giving E display:none ?
>

see above. Stop and reset A


> 4. Given an element E with display:none, what is the effect of applying an
> animation
> A to a descendant of E ?


nothing happens since the element is not part of the active displayed DOM


> What happens when E is given non-none display after A is applied?

Specifically, when the element is given a visible display less than t
> seconds of the animation
> being applied, with t being the animation's duration ?
>

the animation begins as soon as it becomes part of the active DOM.



> Does that make sense ? And am I missing other interesting cases ?
>
> Same 4 questions for visibility but there seems to be consensus in this
> case that there is no
> difference between visibility:hidden and visibility:visible.
>

Correct

Received on Monday, 3 October 2011 17:50:35 UTC