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

Re: [css3-animations] Effect of display:none and visibility:hidden on animations

From: Rik Cabanier <cabanier@gmail.com>
Date: Tue, 19 Jul 2011 11:55:30 -0700
Message-ID: <CAGN7qDDmfaMr3a2gomXc2WbX9TejoGUJhhbpuAxahHOpC5mJqg@mail.gmail.com>
To: Sylvain Galineau <sylvaing@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
I think WebKit's behavior is more useful since it lets you predefine an
animation (with potentially nested animations) and then trigger it with 1
state change.

This is also why it would be very useful if 'display' was allowed in the
keyframes structure. It would allow users to construct intricate animations
that would stay in sync with each other.

Rik

On Sat, Jul 16, 2011 at 4:07 PM, Sylvain Galineau <sylvaing@microsoft.com>wrote:

> The specification does not define what should happen for visibility:hidden
> or display:none. In the former case, one expects the animation to run and
> have the normal layout impact of a visibility:hidden element. This is the
> case in Webkit and Gecko.
>
> There does not seem to be agreement for display:none yet; WebKit does not
> run the animation and applying display:none resets the animation. But
> getComputedStyle() indicates Gecko animates the specified properties when
> display is none.
>
> WebKit's behavior is certainly performance-friendly; Gecko's is what I
> would expect though i.e. if my 2mn animation was script-based and the
> element had display:none for the first minute, setting display:block at the
> 61st second would reflect the state of the element at that point in the
> animation's timeline.
>
> Thoughts ?
>
>
Received on Tuesday, 19 July 2011 18:56:02 GMT

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