S
S
sokira2021-01-27 17:05:08
Sass
sokira, 2021-01-27 17:05:08

How to change btn-primary background color in Bootstrap 4?

In bootstrap.scss I fixed all unnecessary topics:

$theme-colors: map-remove($theme-colors, "info", "light", "dark", "secondary", "warning", "danger", "success");


Left himself one "primary". I set it to the color I wanted.

Now there is a problem.
Want to change colors for btn-primary and for btn-outline-primary ?

Found this design:
$new-bg =  #eb5757;

.btn-outline-primary {
    @include button-outline-variant($new-bg, #222222, lighten($new-bg,15%), $new-bg);
}


Its disadvantage is that it does not create css with the colors I need, but simply overrides them, adding below those generated above.

How to generate a file so that the final styles are included once in the final file?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question