Skip to content
This repository has been archived by the owner on Aug 6, 2019. It is now read-only.

normalize transitionTimingFunction values #11

Open
burin opened this issue Nov 2, 2010 · 3 comments
Open

normalize transitionTimingFunction values #11

burin opened this issue Nov 2, 2010 · 3 comments
Labels

Comments

@burin
Copy link
Collaborator

burin commented Nov 2, 2010

When setting transitionTimingFunction as "linear":

Safari 5.0.1 Mac returns "cubic-bezier(0, 0, 1, 1)"

Chrome 8.0.552.23 dev Mac returns "linear"

Tests were written to expect "cubic-bezier(0, 0, 1, 1)", so they fail in Chrome

@burin
Copy link
Collaborator Author

burin commented Nov 10, 2010

Firefox 4.0 beta Mac returns "border 1s cubic-bezier(0.000000, 0.000000, 1.000000, 1.000000)"

@burin
Copy link
Collaborator Author

burin commented Nov 10, 2010

is it reasonable to expect "linear" back if you set it as "linear"?

@pdokas
Copy link
Collaborator

pdokas commented Nov 10, 2010

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants