When I import the /bootstrap/scss/_variables.scss
file AFTER my custom ./variables.scss
file, I am unable to access the existing global variables from the original _variables.scss
file. Bootstrap often uses cascading variable assignments which becomes a problem when all variables are undefined initially if I include my custom file first.
This is how I currently have it set up based on the Bootstrap documentation:
// Custom Variables
@import 'variables';
// Variables
@import 'bootstrap/scss/variables';
If I want to be able to access variables from the /bootstrap/scss/_variables.scss
file, would duplicating the import like this be the correct approach?
// Variables
@import 'bootstrap/scss/variables';
// Custom Variables
@import 'variables';
// Variables
@import 'bootstrap/scss/variables';