Re: [css3-animations] are "invalid" keyframe rules dropped?

On Dec 17, 2009, at 11:17 AM, L. David Baron wrote:

> http://dev.w3.org/csswg/css3-animations/#keyframes- says:
>  # Every keyframe declaration must have a keyframe rule for 0% or
>  # 100%, possibly defined using "from" or "to". A keyframe
>  # declaration without these keyframe selectors is invalid and will
>  # not be available for animation.
> 
> Two paragraphs later, it says:
>  # The @keyframes rule that is used by an animation will be the
>  # last one encountered in sorted rules order that matches the name
>  # of the animation. @keyframes rules do not cascade; therefore an
>  # animation will never derive keyframes from more than one
>  # @keyframes rule.
> 
> It's not clear to me how these two statements interact.
> 
> In particular, if there is a valid @keyframes rule followed by an
> invalid (by the above definition regarding lacking 0% or 100%) one,
> both with the same name, does an animation with that
> 'animation-name' use the first @keyframes rule or does it fail to
> animate?

Current WebKit behavior is that the last, valid set of keyframes is used. In other words, an invalid set of keyframes later in the sorted rules will not override an earlier valid set of keyframes.

I don't feel strongly about either behavior, but I agree that the spec wording needs to be tightened up.

Simon

Received on Thursday, 17 December 2009 19:42:41 UTC