ramjet.transform between 2 CSS rules?

#52 · open · 1 comments

View on GitHub ↗

futurist

I'm using this lib [cssobj](https://github.com/cssobj/cssobj), it's creating CSS rules from JS. Is it possible to transform between 2 CSS Rules from JS? ``` 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!

Comments

justintaddei

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.