0

我的 scss 文件中有这段代码:

$ttk-bg-green: #99FF00;
$ttk-bg-orange: #FFBE00;
$ttk-bg-purple: #CD66FF;
$ttk-bg-blue: #55BBFF;

$ttk-icon-green: #80D500;
$ttk-icon-orange: #FFAF37;
$ttk-icon-purple: #CD66FF;
$ttk-icon-blue: #62C0FF;
$color-types: "bg" "icon";
$color-styles: "green" "orange" "purple" "blue";
@each $color-type in $color-types {
  @each $color-style in $color-styles {
    .ttk-#{$color-type}-#{$color-style} { color: $ttk-#{$color-type}-#{$color-style}; }
  }
}

它应该产生如下内容:
.ttk-bg-green: #99FF00;

compass 编译器无法编译代码,说 $ttk 变量不存在。
它只是无法将其识别为一个整体变量。
想法?解决方案?

4

0 回答 0