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

ramjet.transform between 2 CSS rules? #52

Open
futurist opened this issue Aug 26, 2016 · 1 comment
Open

ramjet.transform between 2 CSS rules? #52

futurist opened this issue Aug 26, 2016 · 1 comment

Comments

@futurist
Copy link

I'm using this lib cssobj, it's creating CSS rules from JS.

Is it possible to transform between 2 CSS Rules from JS?

// class in JS using cssobj
'.class1': {
    backgroundColor: 'red',
    fontSize: '4em',
    padding: '1em'
  }
'.class2':{
    backgroundColor: 'blue',
    fontSize: '4em',
    padding: '1em'
}
......

var newClass = ramjet.transform('.class1', '.class2')

newClass will have ramjet transform animation, apply to DOM as needed.

I'm checked the src/utils and src/interpolators, it is possible? Maybe it's need a new lib to doing this?

Thank you!

@justintaddei
Copy link

Hi. 4 years too late but did you ever solve what you were trying to do? For something like that I would think CSS transitions alone would do the trick. I'm working on a modern version of ramjet so if there's a use case for this you've found that CSS transitions/animations wouldn't cover, please let me know.

Thank you.

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