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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top