Reputation: 8359
Within Bootstrap, there is a class we can use called is-invalid
. I'm using a separate validation tool that adds the class input-validation-error
onto my elements where the issue is invalid. I cannot change that name. Nor do I want to duplicate styling that is-invalid
already provides.
Is there a way from SASS, that I can borrow the mixin or color schemes of is-invalid
and apply them to my custom class called input-validation-error
?
Upvotes: 1
Views: 516
Reputation: 362710
Sure, you can simply use @extend...
.input-validation-error {
@extend .is-invalid;
}
Demo: https://www.codeply.com/go/IBJbBsznKP
Upvotes: 3