Streaming live at 10am (PST)

Duplicate a Class


#1

I have just spent the afternoon recreating a div class based on another near identical div class. I know I can add a sub-class but that doesn't work for transitions...
My guess is that you could add an option to each class (in the raindrops folder) allowing the user to create a duplicate which can then be renamed, but which retains all the features of the copied class.
It would have saved me hours today!


#2

Agree with you, @Hywel. It would be a very good time saver.

For now, you CAN use combo classes for transitions/interactions. You just need to create a global class with the same name as you have combo class.

Cheers,
Anna


#3

Could you explain please, Anna?


#4

Sure :slightly_smiling:

For example, you have an element with class wrapper (global class). But you want to have similar class, but with the blue background. So you can add combo class blue to the wrapper and change the background color. Then you need to have some interactions with that blue background wrappers. So, you create simple div, give it class blue and now it becomes not only combo class but global class too. Then you can remove this div. Class blue will be available now for interactions.

Hope it is clear enough :slightly_smiling:

Cheers,
Anna


#5

Thanks Anna, yes I know about this, but I have created a transition that only seems to work on the parent class, so I can't see that applying it to 'blue' would show would it?


#6

Transition/animation can affect class that you choose ("affect other elements" option). If you make combo-class a global in the way I explained above, it will be available in the classes dropdown list.

If I still did not get what you need, please, provide some example or read-only link to the project.


#7