Re: [css3-animations] What if different keyframes have different sets of properties?

On Dec 22, 2009, at 11:00 AM, Simon Fraser <smfr@me.com> wrote:

> these keyframes:
>
> @keyframes one {
>  from {  }
>  50%  { left: 50px; top: 50px; }
>  to   { left: 100px; }
> }
>
> would be equivalent to these keyframes for this element:
>
> @keyframes one {
>  from { left: 25px; top: 25px;  }
>  50%  { left: 50px; top: 50px; }
>  to   { left: 100px; top: 25px; }
> }
>
> We see value in using the unanimated value of the property to replace
> missing values, because it allows the author to use keyframes to  
> animate
> something to and from where it is now. I think this is more useful  
> than using
> 'forward fill' logic.

That seems good for the beginning keyframe(s) and the ending keyframe 
(s ). But I'm more ambivalent about it's appropriateness for when  
there is a missing declaration between two frames that do have a value  
for that property, like this one:

# @keyframes one {
#   from { top: 100px; left: 100px; }
#   50%  { top: 200px; }
#   to   { top: 100px; left: 300px; }
# }

Is that still useful to refer to the unanimated value in the middle of  
the animation, or is it just unexpected and missing out on a way to  
write shorter, cleaner code (where you only have to write the in- 
between values of the proprties that you want different from what  
would be automatically in-betweened)?

Received on Tuesday, 22 December 2009 20:02:01 UTC