Adding a bootstrap color in bootstrap/scss/_bs_variables #749
-
As described in https://bootscore.me/documentation/theme/css-scss-compiler/ , I added the line $primary: #FF0000; into the file _bscore_variables.scss . Works well! Then, I wanted to assign the bootstrap functional color $primary one of the palettes defined by bootstrap. I tried: $primary: $blue; That did not work; But if I inserted the line $blue: #0d6efd; before the line $primary: $blue; , again everything worked well. From that, I concluded, that I have to include the file _variable.scss from bootstrap inside of the bootscore theme, as it is mentioned in the bootstrap documentation. But that does not work. Question: what's the right way to include the bootstrap definition files(s) resp. to make their definitions acessivble? Many thanks for your answer. Heartfully Karsten |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Unfortunately you can't properly modify Bootstrap variables with other Bootstrap variables. This happens because our variables file is loaded before the Bootstrap variables, so they can't access them. This done according to the documentation from Bootstrap. So to answer your question: the best way is to again define the variables you want to use in the Bootscore variables file, and then call them. |
Beta Was this translation helpful? Give feedback.
-
Many thanks for this answer. It explains the complete behavior! heartfully KR |
Beta Was this translation helpful? Give feedback.
Unfortunately you can't properly modify Bootstrap variables with other Bootstrap variables. This happens because our variables file is loaded before the Bootstrap variables, so they can't access them. This done according to the documentation from Bootstrap.
So to answer your question: the best way is to again define the variables you want to use in the Bootscore variables file, and then call them.