Closed pdokas closed 13 years ago
thanks for the feedback! I put a few notes here in this issue: https://github.com/brandonaaron/jquery-cssHooks/issues#issue/11
It would be nice to implement something that would return the named presets or the full cubic-bezier() equivalency depending on what the user wants.
The tests are still kinda funky and don't cover the differences between the browsers, but I'm not sure which direction to take
Ah, of course, sorry. I should've looked for issues first. It seems to be a tricky problem.
I suggest normalizing on the cubic-bezier() functions. All the named shortcuts come with official definitions in the spec so we can easily map name --> function params. From there if we normalize the params by ramming them through Number() we will probably wind up with predictable values.
The one possible danger I see in doing so is possible floating point oddness. I'd be surprised frankly to see it come up, but it's something to watch out for.
My apologies, I mistakenly opened this request against head in my fork. Per the discussion in https://github.com/brandonaaron/jquery-cssHooks/issues/issue/11 I'll close this and hopefully be able to get some normalization code committed in the meantime.
The transition test markup states the transition timing function is
linear
but the test cases assume it’ll be returned as a cubic-bezier function. Webkit doesn't automatically translate named function presets into their cubic-bezier() equivalency nor does the spec -- http://www.w3.org/TR/css3-transitions/#transition-timing-function_tag -- suggest that such automatic translation should occur.FWIW, Firefox 4.0b7 does do this translation, but it returns floating point, not integer, values, e.g.
cubic-bezier(0.000000, 0.000000, 1.000000, 1.000000)
.