截图: 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/