W3C home > Mailing lists > Public > www-style@w3.org > February 2013

[css3-animations] Key argument for CSSKeyframesRule.findRule/deleteRule

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Fri, 22 Feb 2013 00:54:47 +0000
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F0178291BF7FAC5@TK5EX14MBXC227.redmond.corp.microsoft.com>
The spec currently defines  this DOMString argument[1] thus:

	# The key must resolve to a number between 0 and 1, or the rule is ignored.

If it meant to say 10% ought to be passed in as '0.1' it is an interesting 
inconsistency since CSSKeyframeRule.keyText is defined as a list of percentage 
values i.e. one couldn't extract a key out of it and use it to delete a rule.

Both Gecko and WebKit expect a percentage value; IE10 followed the spec literally
and expects '0.1' for the 10% rule.

IE, Firefox and Chrome agree to treat they key as single-valued. Comma-separated or
space-separated lists fail. The same browsers also agree to map 0% to the specified 
'from' rule, and 100% to 'to'. Likewise, Gecko and WebKit map a 'from' key to the 
specified 0% rule and 'to' to 100%. IE10 only maps only from numeric selector to 
keyword but not the other way.

I propose we define the key argument for findRule and deleteRule to:
1. Contain a single value
2. The value must be one of: a percentage value, 'from' or 'to'
3. 'from' is treated as equivalent to '0% and vice-versa; 'to' as equivalent to '100%' and

#1 does imply that one can't blindly pass CSSKeyframeRule.keyText to 
CSSKeyframesRule.findRule/deleteRule and retrieve the same object. Supporting this pattern
may, however, require findRule() to be able to return more than one CSSKeyframeRule.


Note: this is currently tracked by bug 14788[2].

[1] http://dev.w3.org/csswg/css3-animations/#CSSKeyframesRules-deleteRule
[2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=14788
Received on Friday, 22 February 2013 00:56:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC