ramjet
ramjet copied to clipboard
ramjet.transform between 2 CSS rules?
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!
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.