I have styles.scss
file which loads variables from variables.scss
and pass them to all imported stylesheets (according to docs)
// style.scss
@use "variables" as *;
@import "test";
// variables.scss
$body-color: red;
If I use simple _tests.scss
then it works fine.
// _tests.scss
body {
color: $body-color;
}
But when I try to use other modules inside imported file, I get an error:
// _tests.scss
@use "sass:math"; // this line causes "Undefined variable" error
body {
color: $body-color;
}
What am I doing wrong?