我在@each中使用Bourbon mixins和变量列表,这个组合没有编译,因为它试图在不抓取变量的情况下运行该函数。
我想知道我是否可以对此进行优化或将其展开。
$colors_list: ('pink' $pink $orange) ('blue' $blue $green) ('orange' $orange $pink) ('green' $green $blue);
@each $color_name in $colors_list{
&.block-color-#{nth($color_name, 1)}{
text-shadow: 1px 2px 2px rgba(shade( #{nth($color_name, 2)}, 50%), 0.75);
}
}
编译错误:
Warning: C:\wamp\www\dev.bodybenefitsbath.com/assets/css/sass/bourbon/functions/tint-shade:8: error: argument `$color-2` of `mix($color-1, $color-2, $weight: 50%)` must be a color
Backtrace:
C:\wamp\www\dev.bodybenefitsbath.com/assets/css/sass/bourbon/functions/tint-shade:8, in function `mix`
C:\wamp\www\dev.bodybenefitsbath.com/assets/css/sass/bourbon/functions/tint-shade:8, in function `shade`
C:\wamp\www\dev.bodybenefitsbath.com/assets/css/sass/_site.scss:1267
Use --force to continue.