SASS - 解析关联数组的错误 [英] SASS - error parsing associative array

查看:233
本文介绍了SASS - 解析关联数组的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SASS文件_button-map-mixin.css,以下面的关联数组开头:

  $ cache: (
color:(),
font-size:(),
line-height:(),
background-color: :()
);

当我编译文件时,得到以下错误:


color:expected)之后的CSS无效,为:(),


我不明白 - 这不是有效的语法吗?



这几乎好像编译器不识别关联数组 -

使用sass 3.3.7和指南针1.0(它是使用Sass 3.3.7版本和Compass 0.12.6)。

解决方案

gem install compass --pre )如果你有wdm相关的错误,那么还要安装wdm(requireRuby开发工具包)gem。如果你保持你的gem列表干净,它会更容易捕捉依赖错误。运行 gem list --local 并卸载所有以前版本的指南针和sass如果你不需要它们。


I have a SASS file _button-map-mixin.css that starts with the following associative array:

$cache: (
    color: (),
    font-size: (),
    line-height: (),
    background-color: (),
    font-family: ()
);

When I compile the file, I get the following error:

Invalid CSS after " color": expected ")", was ": (),"

I don't understand - isn't this valid syntax?

It almost seems like the compiler doesn't recognize an associative array - but I'm using SASS version 3.3.6 (and Compass 0.12.6).

解决方案

Use sass 3.3.7 and compass 1.0 (it's in alpha gem install compass --pre) If you got wdm related error then also install wdm(require "Ruby Development Kit") gem. If you keep your gem list clean it will be easier to catch dependency errors. Run gem list --local and uninstall all previous versions of compass and sass if you don't need them.

这篇关于SASS - 解析关联数组的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆