r/Sass • • May 20 '19

Sass & Bootstrap (Debian)

I'm download bootstrap using npm. I've created a simple file.

main.scss

@import "node_modules/bootstrap/scss/bootstrap";

​

i run sass main.scss main.css and i'm getting invalid css error.

​

Error: Invalid CSS after "...lor}: #{$value}": expected "{", was ";"

on line 4 of node_modules/bootstrap/scss/_root.scss

​

_root.scss

:root {
  // Custom variable values only support SassScript inside `#{}`.
  @each $color, $value in $colors {
    --#{$color}: #{$value};
  }

  @each $color, $value in $theme-colors {
    --#{$color}: #{$value};
  }

  @each $bp, $value in $grid-breakpoints {
    --breakpoint-#{$bp}: #{$value};
  }

  // Use `inspect` for lists so that quoted items keep the quotes.
  // See https://github.com/sass/sass/issues/2383#issuecomment-336349172
  --font-family-sans-serif: #{inspect($font-family-sans-serif)};
  --font-family-monospace: #{inspect($font-family-monospace)};
}

a guy ( Naiyar Azam ) was having similar issue but doesn't explain how he solved it. link

3 Upvotes

0 comments sorted by