Re: [css3-animations] animate display, other non-animatable properties

Oh dear, I just noticed you can’t use the 'display' property at all in 
animations; I was really thinking you could and that just the interpolation 
process was going to be ignored.

Therefore, I propose to support ‘animations’ on *any property*; the behavior 
of an animation of an non-animatable property would be to switch the used 
value as soon as the halfway to the next keyframe is reached (i.e. the 
initial value would be mapped to -1, the final one to +1; the used value 
would be the initial one for strictly negative numbers, and the final one 
for positive numbers (0 included)).

This is (strangely) not what has been done for 'visibility' but I feel this 
is what most authors will expect for other properties; we could probably 
extend the definition used for 'visibility' to 'display' from and to 'none' 
because it can make sense for those properties to keep the element visible 
as long as possible. Also, if a way to animate the property is added later 
one, the behavior will probably match more closely the change halfway than a 
change when the next frame is reached only.

This is a breaking change from the current implementations, whose some 
already shipped unprefixed, but this should not be a problem because current 
browser properly ignore those declarations, just like they ignore unknown 
properties.

______________________________________________
PS: When forking a thread, it would be nice if people also change the 
subject of the mail; this is very difficult to follow discussions otherwise.



> From: Rik Cabanier
>
> I've seen many occasions where people propose to
> have support for 'display:block/none' in keyframes.
> I have written several emails about it as well and
> agree that this would be very nice to have, not just
> for video but also for animations.
>
> There hasn't been much response. One of the issues
> is what 'getcomputedstyle' would return when a
> parameter such as 'display' is not interpolable.
>
> Rik 

Received on Wednesday, 1 August 2012 07:15:10 UTC