我正在尝试使用Dart Sass的@use
自定义布尔玛,但据我了解,例如,当我这样做时
@use "utilities/_all" with (
$blue: #0f52ba,
//etc
);
我不能再使用例如
@use 'layout/hero';
因为hero sass文件需要一个全局$colors
,所以这里将其重新定义为_all.$colors
。
我还尝试加载utilities/_all
,而没有这样的命名空间
@use 'utilities/_all' as * whith (
//etc
);
无济于事……调试时,我确实分别看到了_all.$colors
和$colors
的设置,但是英雄文件始终会抛出此错误:
Error: Undefined variable.
╷
14 │ @each $name, $pair in $colors
│ ^^^^^^^
╵
layout/hero.sass 14:25 @use