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

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

From: Andrew Fedoniouk <andrew.fedoniouk@live.com>
Date: Sat, 1 Oct 2011 18:37:07 -0700
Message-ID: <BLU165-ds3CFA296BE86B08542F1F0F8F50@phx.gbl>
To: "Sylvain Galineau" <sylvaing@microsoft.com>, "Boris Zbarsky" <bzbarsky@MIT.EDU>, <www-style@w3.org>
As an idea how to solve these and similar issues.

I've introduced :animating state flag in my implementation. This allows
to target properties like display, visibility, etc. while animating.

As an example:

li {
  height: auto;
  opacity: 1.0;

   transition: height 400ms linear;

   display: block;

As you see here I am saying that when element will get
.collapsed class its height will be gradually reduced to zero and
for the time of animation the element has overflow-y:hidden;
and is displayed as block (no bullet is shown for that time).

Therefore with :animating there is no need to define
how display, overflow, visibility transition. They are
just non-animatable.

As simple as that.

Andrew Fedoniouk


-----Original Message----- 
From: Sylvain Galineau
Sent: Saturday, October 01, 2011 5:47 PM
To: Boris Zbarsky ; www-style@w3.org
Subject: RE: [css3-animations] display:none, visibility:hidden and 

[Boris Zbarsky:]
> On 9/29/11 5:12 PM, Tab Atkins Jr. wrote:
> > I don't believe there are any issues.  This is clearly the correct
> > model.  There is no reason whatsoever for 'display' to have an effect
> > on what animations run.
> That requires UAs to always compute the value of animation properties on
> all elements, including in display:none subtrees.
> In particular, this requires performing selector matching and so forth on
> those elements, which is something UAs commonly optimize out now.
> I don't believe that this is desirable.  Unless I'm missing something
> here?
> -Boris
I would agree that from an implementation standpoint, this is not optimal.
We should start with what behavior makes sense for authors, though. What do
you want display:none to do to an element's animation, or one running on a 
of that element ? Should it pause the animation ? Stop it ? Same question 
Received on Sunday, 2 October 2011 01:37:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:50 UTC