W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css3-transitions] Why isn't the display property animatable?

From: Lea Verou <leaverou@gmail.com>
Date: Mon, 28 May 2012 18:28:59 -0700
Message-ID: <4FC4265B.2050705@gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
CC: Andy Earnshaw <andyearnshaw@gmail.com>, www-style@w3.org
On 28/5/12 11:50, Rik Cabanier wrote:
> I agree.
> We've had multiple cases where we wanted to have the display property 
> to be animatable.
>
> This has been brought up multiple times and was always mentioned as 
> something that we would get in the near future (even by Tab)...
This will be solved easily once every value becomes animatable (through 
a discrete step, if nothing more elaborate is possible). Tab said this 
has been discussed in the WG and it will eventually be done, probably 
through the addition of a new timing function, to avoid breaking 
existing websites (which is unfortunate as it lacks consistency and 
elegance, but understandable). Then you could use `display` in keyframes 
to control when the change happens and simultaneously animate opacity, 
width, height or anything else. For example, a fade out:

@keyframes fade {
     from { display: block; opacity: 1; }
     99% { display: block; opacity: 0; }
     to { display: none }
}


-- 
Lea Verou (http://lea.verou.me | @LeaVerou)
Received on Tuesday, 29 May 2012 01:29:32 GMT

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