Common/_variables doesn't include bootstrap functions?

Trying to add custom variables to the file as needed.

But if i add any that uses a function or another variable that is left in bootstrap/scss/_variables.scss i get an error when compiling.

Is this normal and do we just need to work around it?

Unfortunately yes, I usually include the functions I’ll need (like str_replace()) in another SCSS file. I haven’t found a great way around this yet.

1 Like

With Bootstrap 4 Beta 2’s new method of merging arrays, here’s how I’ve been laying out my main.scss:

@import "~bootstrap/scss/functions";
@import "common/variables";
@import "~bootstrap/scss/variables";

Which should get you want you need.

Come to think of it, should I make a PR to include Bootstrap’s functions at the top of main.scss?

… EDIT: aaaand I just noticed that you tagged this thread Sage8, which doesn’t do Bootstrap 4 Beta 2. Ignore me.

1 Like