W3C home > Mailing lists > Public > www-style@w3.org > December 2009

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

From: Simon Fraser <smfr@me.com>
Date: Thu, 17 Dec 2009 11:38:05 -0800
Cc: www-style@w3.org
Message-id: <7602B61A-8EBD-4C75-9ABE-6EFEE29EE671@me.com>
To: "L. David Baron" <dbaron@dbaron.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:47:12 GMT