Skip to content

Bootstrap SCSS on NPM does not generate bg-dark classes #39794

Discussion options

You must be logged in to vote

I have converted your issue to a discussion first @TheDogHusky
Our .bg-* classes are generated from the $theme-colors map. In your example, you override the $theme-colors and don't define the darkkey so .bg-darkwon't be generated. I also means that your $theme-colors will generated a .bg-light-hes-blue class for instance.

So in order to make .bg-dark available, you can add the following:

$theme-colors: (
  // ...
  "dark": $dark
);

And to have access to $dark, you'll need to import variables.scss before defining the map.

Hope it can help!

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by TheDogHusky
Comment options

You must be logged in to vote
1 reply
@julien-deramond
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #39793 on March 17, 2024 18:23.