W3C home > Mailing lists > Public > www-style@w3.org > September 2011

[css3-animations] Definition for when an animation applies to an element

From: Øyvind Stenhaug <oyvinds@opera.com>
Date: Thu, 22 Sep 2011 18:17:55 +0200
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.v17wv5hnbunlto@oyvinds-desktop>

"An animation applies to an element if the element has a value for  
‘animation-name’ that references a valid keyframes rule."

This wording seems rather inaccurate. Which animation applies? And there  
could be several @keyframes rules.

One possible interpretation would be something like "An animation applies  
to an element if its name appears as one of the identifiers in the  
element's computed value of 'animation-name', and the animation uses a  
@keyframes rule that is valid"

where the "uses" terminology refers to a sentence in section 3 that 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  
specified by the ‘animation-name’ property"

(This would mean that even though example I in the spec has a valid  
@keyframes rule, diagonal-slide wouldn't apply if there was a "@keyframes  
diagonal-slide { invalid }" further down. Though I'm not sure at which  
exact point an invalid bit of code stops counting as a @keyframes rule.)

Or should the last quote above instead say that the @keyframes rule that  
is used is the last one that matches the animation-name *and is valid*?

Øyvind Stenhaug
Core Norway, Opera Software ASA
Received on Thursday, 22 September 2011 16:18:28 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:04 UTC