ramjet icon indicating copy to clipboard operation
ramjet copied to clipboard

ramjet.transform between 2 CSS rules?

Open futurist opened this issue 8 years ago • 1 comments

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!

futurist avatar Aug 26 '16 07:08 futurist

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.

justintaddei avatar Apr 12 '20 04:04 justintaddei