I have a CSS class in my code that overrides a class of one specific library. Using this I'm able to override .libraryclass.libraryclass-something with one specific image
#myobject .libraryclass.libraryclass-something {
background: url("../../../images/Image1") no-repeat 0 0;
}
Now I have to use a condition in my JS but in case to use Image1 I need to use Image2. I can create another class similar to the first one pointed to Image2 but I don't know how to do it because I always need to override the class .libraryclass.libraryclass-something.
Let's say in my JS file.
If (a===1) {
#myobject .libraryclass.libraryclass-something
}
else {
??? (because I need to respect the same name...)
}