codegy
codegy

Reputation: 118

Using Bootstrap 4 variables in my file

I want to use Bootstrap 4 variables on my own CSS rules (e.g. $font-family-serif). I'm using Webpack and importing the Bootstrap variables and functions in my scss file like this:

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

When trying to compile, I get the following error:

font-family: $font-family-serif;
            ^
    Undefined variable: "$font-family-serif".

Upvotes: 0

Views: 224

Answers (1)

Carol Skelly
Carol Skelly

Reputation: 362380

There is no $font-family-serif variable in Bootstrap 4. There is a $font-family-sans-serif variable.

Upvotes: 1

Related Questions