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

Add standard timing functions #3

Open
kof opened this issue Jan 3, 2017 · 4 comments
Open

Add standard timing functions #3

kof opened this issue Jan 3, 2017 · 4 comments

Comments

@kof
Copy link
Member

kof commented Jan 3, 2017

For e.g. ease-in-out

Example with JSS:

import {easeInOut} from 'css-functions'

const styles = {
  container: {
    transition: {
      duration: 0.5,
      timingFunction: easeInOUt,
    }
  }
}
@Shastel
Copy link
Member

Shastel commented Jul 25, 2017

@kof and where for example, should be placed frames function?

it can be in timing and you will use it as

import { timing } from 'css-functions'

const styles = {
   container: {    
      transition: {      
         timingFunction: timing.frames(10),  
      } 
  } 
}

or this function should be also available as

import { frames } from 'css-functions'

@kof
Copy link
Member Author

kof commented Jul 25, 2017

Just thought about it, actually ease-in-out is not a function call, its the function name or a constant. Not sure if they are actually a good fit here.

A cubic-bezier(0.1, 0.7, 1.0, 0.1) timing function is on the other hand a function call.

@kof
Copy link
Member Author

kof commented Jul 25, 2017

Also in css all those things are in a global name space, we don't even need to scope them, they can't conflict: import {easeInOut} from 'css-functions' would be actually just fine.

@kof
Copy link
Member Author

kof commented Jul 25, 2017

It just doesn't make much sense to import them, because there is not much benefit vs. just using a string directly.

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

No branches or pull requests

2 participants