is it possible in CSS3 to let a class just add new transition properties to an existing transition instead of replacing the old transition definition?
For example:
.transition-a {
transition: opacity 0.3s ease-in;
}
.transition-b {
transition: color 0.3s ease-in !important;
}
<div class="transition-a transition-b">
</div>
would overwrite transition-a instead of adding an additional property to the exisitng transition definition.
It would be nice if it would be possible to compose different classes like mixins resulting in a property like
transition: color 0.3s ease-in, opacity 0.3 ease-in`
without the need to explicitly specify a rule for the combination of both classes that would force you to repeat yourself.
EDIT: More Details
I currently use the SASS source of Bootstrap and want to apply an additional transition on Bootstraps .badge
class. I have an additional class .fade
containing the following:
.custom-badge.fade {
transition: opacity 0.3s ease-in !important;
It would work fine if it wouldn't overwrite the definitions of Bootstraps .badge
class transition property. I simply want to add an additional transition property to the exiting color transitions.