- From: Sylvain Galineau <galineau@adobe.com>
- Date: Fri, 21 Mar 2014 17:04:08 +0000
- To: Tab Atkins Jr. <jackalmage@gmail.com>
- CC: "<www-style@w3.org>" <www-style@w3.org>
On Mar 21, 2014, at 8:58 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > On Thu, Mar 20, 2014 at 6:21 PM, Sylvain Galineau <galineau@adobe.com> wrote: >> I run in the following cross-browser issue while investigating the previous issue [1]. >> >> The specification defined the value passed to these methods as a string with the following property: >> >> # The key must resolve to a number between 0 and 1, or the rule is ignored. >> >> And indeed, if you do findRule("1") or deleteRule("0.5"), IE dutifully finds/removes the 100% and 50% keyframes, respectively. >> >> No other browser does this, however. Gecko, WebKit and Blink all expect "100%" and "50%" >> >> To mitigate any compat issues, one possible compromise would be to require browsers to support both in the future. >> >> [1] http://lists.w3.org/Archives/Public/www-style/2014Mar/0498.html > > Urf, IE followed the literal spec text, even when it was stupid, > rather than objecting. :/ (Not that everyone else's "just implement > what we think it really means, rather than objecting" strategy is any > better.) I wouldn't be so harsh but yes, it at least seems arbitrarily awkward :) Not sure how this bit survived this long in the spec. Also just realized I brought this up already [1]. [1] http://lists.w3.org/Archives/Public/www-style/2013Feb/0587.html (Note: whether we allow a comma-separated list of value to be passed to these methods is a separate issue; I'm sensing some f2f time on cleaning up the animations OM) > > I'm fine with doubling up like this if necessary. Do we need to be > clear that browsers must be careful about float precision? 100% and > 50% can be expressed exactly with a floating-point, but 10% can't be - > how does IE react when passed ".1"? While playing with this in IE, this turned out to be even more awkward than I thought. Say you want to change your 40% rule to 50%: you'd first do findRule("0.4") but then the new keyText *must* be "40%". Yuck. I'm thinking the right answer here is to change the spec to require percentages; IE can keep parsing 0<n<1 values for its own compat.
Received on Friday, 21 March 2014 17:04:57 UTC