SASS - error parsing associative array [duplicate]

做~自己de王妃 提交于 2019-12-11 10:27:47

问题


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).


回答1:


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.



来源:https://stackoverflow.com/questions/23668366/sass-error-parsing-associative-array

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!