css - Stylus ParseError : expected “indent” , 得到 “;”

标签 css gruntjs stylus

截图: http://saveimg.ru/show-image.php?id=424e87f390411d3932bb3d73ff613e58

文件“Gruntfile.js”的一部分

sprite: {
      mixins: {
        src: ['layout/media/images/sprite/*.png'],
        destImg: 'layout/media/images/sprite.png',
        destCSS: 'layout/assets/css/variables/sprite-mixins.styl',
        algorithm: 'binary-tree',
        padding: 1,
        imgPath: '../images/sprite.png',
        cssTemplate: 'sprite_template/mixins.mustache',
        cssVarMap: function (sprite) {
          sprite.name = 's-' + sprite.name;
        },
      },
    },

在几个元素中,一切都完美无缺。突然,有一个错误。

使用 grunt 和插件 - grunt-spritesmith。

(https://github.com/Ensighten/grunt-spritesmith)。

怎么了?

最佳答案

嗯,你不能在 Stylus 中用点开始混合。如果您从 .s-demo(); 调用中删除 .,一切都会好起来的。

关于css - Stylus ParseError : expected “indent” , 得到 “;”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25060576/

相关文章:

css - GWT Stockwatcher 教程 - 自动资源包括

javascript - Dart 有类似 GruntJs 的东西吗?

jquery - Requirejs 输出到单个文件(不包括 jQuery)不保留依赖关系?

css - 如何在中途反转循环?

css - 如何使用 Stylus 创建多个 CSS 文件?

css - 嵌套在手写笔中的父级选择器

javascript - 如何计算内部有一些文本和固定宽度的div的高度

html - 伪元素文本需要垂直调整,需要什么CSS?

html - 如何处理 child 超出其父容器的边界?

coffeescript - 编译到 `.js` 保持相同的文件夹结构