2

I'm trying to use @use instead of @import to import all the variables in my _custom.scss partial to styles.scss sass file. But @use is not overriding the variables as i intendent. How to solve?

_custom.scss

 
$primary: #ff00f2;
$secondary: #bb6ef5;

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

styles.scss

@import 'custom';
Patrick Prakash
  • 500
  • 1
  • 7
  • 17

1 Answers1

0

Add all the variables inside the with by using the @use as shown below

_custom.scss

@use "../node_modules/bootstrap/scss/bootstrap.scss" with (
$primary: 'your color';
$secondary: 'your color';
);

styles.scss

@use 'custom'
Patrick Prakash
  • 500
  • 1
  • 7
  • 17