scss-语法抛出';isn';t为有效值';有些地方有错误,但其他地方没有 我遇到了SCSS的奇怪问题(使用基金会,但我不确定这是一个基础问题) 使用gulp sass v3.7.3和gulp v3.9.1 // 14. Close Button // ---------------- $closebutton-position: right top; $closebutton-offset-horizontal: ( small: .66rem, medium: 1rem, ); $closebutton-offset-vertical: ( small: .33em, medium: .5rem, ); $closebutton-sizes: ( small: 1.5em, medium: 2em, ); $closebutton-lineheight: 1; $closebutton-color: $dark-gray; $closebutton-color-hover: $black;

scss-语法抛出';isn';t为有效值';有些地方有错误,但其他地方没有 我遇到了SCSS的奇怪问题(使用基金会,但我不确定这是一个基础问题) 使用gulp sass v3.7.3和gulp v3.9.1 // 14. Close Button // ---------------- $closebutton-position: right top; $closebutton-offset-horizontal: ( small: .66rem, medium: 1rem, ); $closebutton-offset-vertical: ( small: .33em, medium: .5rem, ); $closebutton-sizes: ( small: 1.5em, medium: 2em, ); $closebutton-lineheight: 1; $closebutton-color: $dark-gray; $closebutton-color-hover: $black;,sass,gulp,zurb-foundation,Sass,Gulp,Zurb Foundation,此块引发以下错误: Error in plugin 'sass' Message: bower_components/myfoundation/scss/_settings.scss Error: (small:0.66rem,medium:1rem) isn't a valid CSS value. on line 349 of bower_components/emerald/scss/_settings.scss >> small: .6

此块引发以下错误:

Error in plugin 'sass'
Message:
    bower_components/myfoundation/scss/_settings.scss
Error: (small:0.66rem,medium:1rem) isn't a valid CSS value.
        on line 349 of bower_components/emerald/scss/_settings.scss
>>         small: .66rem,
   --------^

Error in plugin 'sass'
Message:
    bower_components/myfoundation/scss/_settings.scss
Error: (small:0.66rem,medium:1rem) isn't a valid CSS value.
        on line 349 of bower_components/emerald/scss/_settings.scss
>>         small: .66rem,
   --------^
奇怪的是,如果我注释掉
$closebutton offset horizontal
$closebutton offset vertical
变量中的值,则构建的所有内容都没有错误,即使
$closebutton sizes
使用完全相同的语法:

Builds with no errors:
// 14. Close Button
// ----------------

$closebutton-position: right top;
$closebutton-offset-horizontal: (
        //small: 0.66rem,
        //medium: 1rem,
);
$closebutton-offset-vertical: (
        //small: .33em,
        //medium: .5rem,
);
$closebutton-sizes: (
        small: 1.5em,
        medium: 2em,
);
$closebutton-lineheight: 1;
$closebutton-color: $dark-gray;
$closebutton-color-hover: $black;

我已经过期了一点,似乎与使用浮点/整数值或ems/rems无关

尝试删除每个贴图最后一项上的尾随逗号@biggles尝试时没有运气。我要注意的是,该语法在文件中的多个位置使用,并且始终包含最后一个逗号。@itsGeorge代码没有问题,因为在我尝试它时,它编译正确。我怀疑它被错误地用在了某个地方。错误表明它不是有效的CSS值。你能给我们看看这些变量的代码行吗?这些变量被用作CSS属性的值“BruteNigMA”,这里是变量在基础中使用的地方。这是我需要查看的文件
/emerald/scss/_settings.scss
因为这就是错误的来源。我需要知道它在哪里被用作CSS属性的值。正如我前面所说,代码编译得很好。我在调试时更进一步,将其用作属性的值,它抛出了相同类型的错误。请尝试删除每个Map最后一项上的尾随逗号,但没有运气@biggles。我要注意的是,该语法在文件中的多个位置使用,并且始终包含最后一个逗号。@itsGeorge代码没有问题,因为在我尝试它时,它编译正确。我怀疑它被错误地用在了某个地方。错误表明它不是有效的CSS值。你能给我们看看这些变量的代码行吗?这些变量被用作CSS属性的值“BruteNigMA”,这里是变量在基础中使用的地方。这是我需要查看的文件
/emerald/scss/_settings.scss
因为这就是错误的来源。我需要知道它在哪里被用作CSS属性的值。正如我前面所说,代码编译得很好。我在调试时更进一步,将其用作属性的值,它抛出了相同类型的错误。