Cody Cody - 1 month ago 14
Sass (Sass) Question

Bootstrap Customization SASS Variables Override Not Working

Trying to customize Bootstrap as documented here: https://getbootstrap.com/docs/4.0/getting-started/options/

Here's my

main.scss
file:

@charset 'utf-8';

@import 'variables';
@import url('https://fonts.googleapis.com/css?family=Montserrat:500,700');
@import url('https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css');
@import 'layouts';


In the variables files, I have:

$font-family-base: 'Montserrat', sans-serif;
$body-color: red;


However, these variables are ignored by Bootstrap. What am I doing wrong?

Answer Source

But you are importing the css file.

Just download the sass source, import it and then you can edit bootstrap variables.