Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

import bootstrap variables in my style.sass issue

I am trying to import bootstrap 4 beta variables partial in my style.sass but when i compile i get the following error:

events.js:160 throw er; // Unhandled 'error' event ^ Error: node_modules\bootstrap\scss_variables.scss Error: argument $color of darken($color, $amount) must be a color

   Backtrace:
    node_modules/bootstrap/scss/_variables.scss:168, in function `darken`
    node_modules/bootstrap/scss/_variables.scss:168
    on line 168 of node_modules/bootstrap/scss/_variables.scss

$link-hover-color: darken($link-color, 15%) !default; ------------------------^

at options.error (C:\Users\Giannis\Desktop\np-lab\node_modules\node-sass\lib\index.js:291:26)

here is my code:

@import "../../../node_modules/bootstrap/scss/variables"

body
  background-color: red

Any ideas what is going on? thanks

like image 951
Giannis Savvidis Avatar asked Oct 30 '17 13:10

Giannis Savvidis


1 Answers

Before importing variables file, you have to import functions.scss. Darken function is defined in it.

@import "../../../node_modules/bootstrap/scss/functions";
@import "../../../node_modules/bootstrap/scss/variables";
<!--your styles here-->
like image 60
Fathima Linsa K Avatar answered Nov 15 '22 09:11

Fathima Linsa K