Maybe an scss editor limitation?

I imported the bootstrap scss and I created my custom.scss.
In my custom.scss file I want to assign this

$headings-font-weight: $font-weight-bold;

but I got this error: “Undefined variable”

It works only in this way

$headings-font-weight: 700;

Am I wrong some setting?

Is the variable defined? Your $font-weight-bold needs to be defined before it can be used.

Also, I don’t think you need to import the Bootstrap SCSS file, unless you are just wanting to have access to it for building of course since we cannot always see the “full” CSS and SCSS directly in BSS I’m pretty sure they are already included? Someone correct me if I’m wrong here as I don’t do a lot with it yet.

1 Like

It should be defined because I imported all the bootstrap.scss file

@import "./Bootstrap-SCSS/bootstrap.scss";

I’ll try without have bootstrap scss folder imported, but I do not think it can work without.

1 Like

Is think that bootstrap is already compiled and therefore you don’t have the compiletime variables available in your scss files. This may also be the reason why you can’t easily change the themes.

That what are you trying to do is incredible bad practice, don’t do that. Assigning existing variable to a new variable doesn’t make any kind of sense at all.

It is in bootstrap documentation…