Re: [CSS2 Animation] comma-separated values

On Jan 29, 2011, at 8:31 pm, Alan Gresley wrote:

> 
> http://dev.w3.org/csswg/css3-animations/
> 
> I see in 3 (Keyframes) this text (emphases added).
> 
>  | The keyframe selector for a keyframe style rule consists of a
>  | *comma-separated* list of percentage values or the keywords
>  | ‘from’ or ‘to’.
> 
> 

No, the "keyframe selector" refers to the "from", "to" or percentage values. So you can say this:

@keyframes wobble {
  from { left: 0px; }
  25%, 50% { left: 100px; }
  75%, to { left: 200px; }
}


> The properties, 'animation-name', 'animation-duration', 'animation-timing-function', 'animation-iteration-count', 'animation-direction', 'animation-play-state', 'animation-delay', 'animation-fill-mode', 'animation' (shorthand) all allow comma-separated values but none of the prose in each section specifies this.

Commas are used in these properties when multiple animations are specified (just like the background-image properties, for example).

Simon

Received on Sunday, 30 January 2011 04:58:44 UTC