如何将dart sass @use与Bulma之类的框架集成在一起?

时间:2019-12-20 13:11:54

标签: dart sass bulma

我正在尝试使用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

0 个答案:

没有答案