Re: [css3-animations] CSSKeyframeRule and rules with multiple keys

On Mar 19, 2011, at 9:55 pm, L. David Baron wrote:

> http://dev.w3.org/csswg/css3-animations/#DOM-CSSKeyframeRule says:
>  # The CSSKeyframeRule interface represents the style rule for a
>  # single key.
> and goes on to describe the keyText attribute as representing a
> single floating point number.
> 
> However, keyframe rules can have selectors with multiple numbers,
> e.g.:
>  25%, 75% { color: green }
> What should such a rule return for keyText?

I think it should return "25%, 75%".

> Also, what should happen when setting keyText?  For example, which
> of the following should work:
>  rule.keyText = "0.25";
>  rule.keyText = "0.25, 0.75";
>  rule.keyText = "25%";
>  rule.keyText = "25%, 75%";
> 
> (It would seem a little more consistent with style rules if keyText
> aligned with selectorText and actually represented the text of the
> selector, e.g., "25%, 75%".)

I agree that it would be cleaner if these were all just percentages.

Simon

Received on Sunday, 20 March 2011 16:20:37 UTC