Answer the question
In order to leave comments, you need to log in
How to override the mixin parameter without touching the source code?
Good afternoon.
The sources contain such a mixin buttons.scss It looks like this:
@mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
color: color-yiq($background);
@include gradient-bg($background);
border-color: $border;
@include box-shadow($btn-box-shadow);
@include hover {
color: color-yiq($hover-background);
@include gradient-bg($hover-background);
border-color: $hover-border;
}
Answer the question
In order to leave comments, you need to log in
You can pass it as a named argument when called, i.e.
@include button-variant($active-background: white, $active-border: lightgrey);
Flying but in this case you will have to create a new class of buttons and call the mixin in them. Are there no other options for me to override the $hover-background of the buttons with color-yiq instead of the default dimming?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question