I am getting an error when compiling my bootstrap sass file. The error looks like this below. When I comment out lines 4 and 8 of _root.scss it works, but that is not an ideal solution. What's going on? - I am running the latest version of Sass 3.5.3
Error: Invalid CSS after "...lor}: #{$value}": expected "{", was ";"
on line 4 of /Users/.../bootstrap-4.0.0/scss/_root.scss
...
1: :root {
2: // Custom variable values only support SassScript inside `#{}`.
3: @each $color, $value in $colors {
4: --#{$color}: #{$value};
5: }
6:
7: @each $color, $value in $theme-colors {
8: --#{$color}: #{$value};
9: }
scss , you'll import Bootstrap's source Sass files. You have two options: include all of Bootstrap, or pick the parts you need. We encourage the latter, though be aware there are some requirements and dependencies across our components. You also will need to include some JavaScript for our plugins.
Bootstrap is an awesome CSS framework that can help you create stylish and sleek websites. Some developers and teams find that code written in Bootstrap is easier to maintain than regular CSS, so they prefer Bootstrap to vanilla CSS.
It looks like a bug in SASS compiler itself. Here you have very similar issues:
https://github.com/twbs/bootstrap/issues/24549
https://github.com/sass/sass/issues/2383
Try this:
1: :root {
2: // Custom variable values only support SassScript inside `#{}`.
3: @each $color, $value in $colors {
4: --color-#{$color}: #{$value};
5: }
6:
7: @each $color, $value in $theme-colors {
8: --color-#{$color}: #{$value};
9: }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With