我有一个Sass文件,其中包含多个导入,如下所示:
@import("variables")
@import("custom-variables")
@import("widgets")
@import("custom-styles")
我声明了一个变量$promoBoxColor,它在variables和custom-variables中都有用到,widgets和custom styles也引用了这个变量。
但我发现,在custom-styles中如果使用这个变量,实际上会使用在variables中定义的颜色,而不是在custom-variables中定义的颜色。
在Sass中可以通过这种方式覆盖变量吗?如果我只是覆盖widgets中使用的颜色,似乎没什么问题。
$foo: someval !default
? - cimmanon