2012-08-15 82 views
0

我试图转换正在我的导航中使用的精灵,以节省HTTP请求的背景图像,但即时得到以下错误罗盘产生的精灵

content: "\000a Sass::SyntaxError: Undefined mixin 'navigation-sprite'.\000a (in \002f home\002f html\002f teammngt\002f app\002f assets\002f stylesheets\002f navigation.css.scss)"; 

SCSS文件

@import "compass"; 

@import "navigation/main/*.png";

a { 
    display: table-cell; 
    /* #header_main height + 1, to move it 1px into the header_main strip */ 
    height: 61px; 
    width: 120px; 
    @include navigation-sprite(bg-normal); 
    //background: url('navigation/main/bg-normal.png') no-repeat; 
    /* Concerning fonts/text */ 
    line-height: 26px; 
    /* Concerning text align */ 
    text-align: center; 
    vertical-align: bottom; 

肯定即时通讯做什么wron摹这里,但我不是运气不好的工作出来

回答

0
@import "compass"; 
@import "navigation/main/*.png"; 
@include all-main-sprites; 

使用这样的:

@include main-sprite(bg-normal); 
+0

加入这一行我现在得到'内容:“\ 000A萨斯::语法错误:未定义的混入“的所有(\ 002f home \ 002f html \ 002f teammngt \ 002f app \ 002f assets \ 002f stylesheets \ 002f navigation.css.scss)“;' – 2012-08-15 14:26:19

+0

已更新答案 – emrahbasman 2012-08-15 14:41:43

+0

该代码在dev中工作,但是当我加载到生产中时,出现以下错误'content:“\ 000a Sass :: SyntaxError:要导入的文件未找到或不可读:指南针\ 000a加载路径:\ 002f home \ 002f html \ 002f teammngt \ 000a(in \ 002f home \ 002f html \ 00 2f teammngt \ 002f app \ 002f assets \ 002f stylesheets \ 002f navigation.css.scss)“;' – 2012-08-15 15:13:47