How to use bootstrap color variable in SASS

Viewed 6684

It's bootstrap 4-beta in SASS.

The question is how I can use the bootstrap color variable in my SASS application? What I have done to do this is:

color: $theme-colors(primary);

but this doesn't work and throws an error.

any help is appreciated.

Thank you

2 Answers

You should use this: color: theme-color("primary");

Theme colors isn't a variable, it is a function, that's why you shouldn't use $ before it.

Just use...

color: $primary;

Bootstrap assigns values to the color values before adding them to the theme-colors so they're all available in the variables.scss.

Also see: How to change the bootstrap primary color?

Related