After customizing Bootstrap's theme colors in my SCSS file, I encountered an issue. Here is how I did it:
// set variables
$primary: #8dc3a7;
$light: #b4d6c1;
$starorange: #df711b;
// import functions and variables
@import "../node_modules/bootstrap/scss/functions";
@import "../node_modules/bootstrap/scss/variables";
$custom-theme-colors: (
"starorange": $starorange,
);
// modify theme colors
$theme-colors: map-merge($theme-colors, $custom-theme-colors);
// bootstrap import
@import "../node_modules/bootstrap/scss/bootstrap";
I was able to successfully apply the starorange
color to a button using the following code:
<button class="btn btn-md btn-starorange">Send</button>
However, when I tried to use the same color for text or background within the same HTML document, such as in the following examples:
<div class="pb-1 text-starorange">
<i class="bi bi-star-fill"></i>
<i class="bi bi-star-fill"></i>
<i class="bi bi-star-fill"></i>
<i class="bi bi-star-fill"></i>
<i class="bi bi-star-fill"></i>
</div>
or
<section class="bg-starorange">
.... some html here ...
</section>
In both cases, the color was not applied at all. I am unsure why this is happening and would appreciate any assistance.
PS: It appears that while classes like btn-starorange
, border-starorange
, or link-starorange
are present in the transpiled CSS file, bg-starorange
and text-starorange
do not exist.