Kitara Kitara - 1 year ago 54
Sass (Sass) Question

How to create new set of color styles in Bootstrap 4 with sass

I'm starting to navigate through the wonderful Bootstrap 4 and I'm wondering how to add a whole new set of elements color to the _custom.scss

Example: Right now you have btn-danger, text-danger etc... how to create for example, using a random name: "crisp" set... so you will have btn-crisp, text-crisp etc...

My guess would be to start with adding a variable

$brand-crisp: #color !default;

But, then what? Thanks! I appreciate your help.

Answer Source

There is not an all inclusive color mixin, so I think you need to use the mixins individually...

.btn-custom {
    @include button-variant(#cece19, #222222, #cece19);

.btn-custom-outline {
    @include button-outline-variant(#222222);

.card-custom {
    @include card-variant(#aa9999, #997777)