指南针生成的精灵

时间:2012-08-15 14:11:00

标签: ruby-on-rails compass-sass sass

我正在尝试将我导航中当前正在使用的背景图像转换为精灵以保存在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;

肯定我在这里做错了,但我没有太多的运气解决

1 个答案:

答案 0 :(得分:0)

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

像这样使用:

@include main-sprite(bg-normal);