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

http://dev.w3.org/csswg/css3-animations/#animations

"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