我向mixins.less添加了一些代码:
img { &:extend(.img-responsive); }另见:Images not responsive by default in Twitter Bootstrap 3?和https://stackoverflow.com/a/15573240/1596547
当我从命令行运行grunt dist时,我得到:
Running "recess:bootstrap" (recess) task
>> Parser error in less/mixins.less
>> 549. img {
>> 550. &:extend(.img-responsive);
>> 551. }
Warning: Use --force to continue.
Aborted due to warnings.但是当我用Lessc:lessc bootstrap.less编译它时,我没有发现一个错误。(减编译器) JavaScript )
&:extend需要更少的1.4.0。所以格朗特/休庭使用不同的编译器?
update运行install grunt-contrib-less --save-dev提供:
grunt-contrib-less@0.7.0 node_modules/grunt-contrib-less
├── grunt-lib-contrib@0.6.1 (zlib-browserify@0.0.1)
└── less@1.4.2 (mime@1.2.11, mkdirp@0.3.5, ycssmin@1.0.1, request@2.27.0)因此,我希望减少v1.4.2,但仍然会出现此错误。
发布于 2013-07-29 23:24:05
这取决于您拥有的grunt-contrib-less版本。
运行:
npm update grunt-contrib-lesshttps://stackoverflow.com/questions/17935703
复制相似问题