Bootstrap 4.5.0 SASS error
See original GitHub issueWe’re using Bootstrap 4.5.0 in our SASS project.
We have this sass file:
@import "~bootstrap/scss/bootstrap-grid";
@import "~bootstrap/scss/bootstrap-reboot";
@import "~bootstrap/scss/alert";
@import "~bootstrap/scss/buttons";
@import "~bootstrap/scss/forms";
@import "~bootstrap/scss/nav";
@import "~bootstrap/scss/navbar";
@import "~bootstrap/scss/dropdown";
@import "~bootstrap/scss/utilities/text";
@import "~bootstrap/scss/type";
When we try to compile this, we get this error:
ERROR in node_modules/bootstrap/scss/_root.scss:5:1 Please check validity of the block starting from line #5 [Fatal]
It appears that this piece of code is throwing the error:
@each $color, $value in $colors {
--#{$color}: #{$value};
}
We’re using the Dart implementation for SASS, version 1.26.10.
I was unable to create a reproducible example because I keep getting other errors. Please advise.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Bootstrap 4.5 scss compilation error on escapeSVG
Now when I compile the app (we compile from Bootstrap's SCSS imported into our own to override variables) it fails with this error:...
Read more >Bootstrap 4.5.0
Quickly set user-select with the new utilities and Sass map. New Reboot style for pointer cursors. We now include a role="button" selector in ......
Read more >Theming Bootstrap · Bootstrap v4.5
As you customize the included maps, you may encounter errors where a specific Sass map's key is being used. For example, we use...
Read more >Sass · Bootstrap v5.0
Utilize our source Sass files to take advantage of variables, maps, mixins, and functions to help you build faster and customize your project....
Read more >Introduction · Bootstrap v4.5
Get started with Bootstrap, the world's most popular framework for building responsive, mobile-first sites, with jsDelivr and a template starter page.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mdo the issue is still present in Bootstrap 4.5 ATM, the linked ticket on sass-linkt is from 2017 and I cannot see any relevant action since then https://github.com/sasstools/sass-lint/issues/1114#issuecomment-544216592.
This ticket is a year old now.
I think it would be good to find a solution in Bootstrap (4) and not wait any longer for upstream changes. Could you reopen the ticket? And do you have a preferred way of solving this?
After searching around more, I found this comment.
When I change
to
it compiles successfully.