Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animation Easing #8

Closed
noahcollins opened this issue Jan 26, 2014 · 2 comments
Closed

Animation Easing #8

noahcollins opened this issue Jan 26, 2014 · 2 comments

Comments

@noahcollins
Copy link

What do you think about adding support for other transition timings? You have ease in the genCSS function. I could add some other common timings.

  • ease-in
  • ease-in-out
  • ease-out
  • linear
  • step-start

If that sounds interesting, let me know how you'd like to map the declarative language. I have a rough concept for how this might look.

Keep ease as the default, and let users explore the other timings when they're ready.

So the "move" keyword would represent the default ease timing.

enter from the top and move 50px over 1.33s

And the rest would be declared something like:

enter from the top and move 50px over 1.33s and ease-in
enter from the top and move 50px over 1.33s and ease-in-out
enter from the top and move 50px over 1.33s and ease-out
enter from the top and move 50px over 1.33s and linear
enter from the top and move 50px over 1.33s and 5 steps

Or:

enter from the top and ease-in 50px over 1.33s
enter from the top and ease-in-out 50px over 1.33s
enter from the top and ease-out 50px over 1.33s
enter from the top and move linear 50px over 1.33s
enter from the top and move in 5 steps 50px over 1.33s
move 66px and enter and ease-in from the bottom after 1s
move 66px then enter from the bottom after 1s in 5 steps
...

Going with a default keeps things nice and clean for people who don't want to mess with timings.

For reference, the MDN docs on CSS transform timing functions.

@jlmakes
Copy link
Owner

jlmakes commented Jan 27, 2014

Hey Noah,

I like where this is headed; I think something like your second example fits well; e.g:

<foo data-scrollreveal="enter left and ease-in 25px over 1.5s">

The language gets a little funky for linear and step easing though. For example:

<foo data-scrollreveal="enter left and linear 25px over 1.5s">

Perhaps adding support for ease-in ease-in-out and ease-out as alternatives to move is a simple step forward, and we solve the linear and step easing syntax later?

@noahcollins
Copy link
Author

Agreed. I'm going to think about linear and step over the weekend and see if there's any easy approach to including them.

@jlmakes jlmakes closed this as completed Feb 13, 2014
jlmakes pushed a commit that referenced this issue Feb 13, 2014
@jlmakes jlmakes removed bug labels Apr 23, 2014
@jlmakes jlmakes changed the title Add transition timings Animation Easing Oct 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants