我添加一些代碼來mixins.less:爲什麼在編譯Bootstrap 3 RC1時給Grunt/Recess一個錯誤而Lessc不是?
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 1.4.2(LESS Compiler)[JavaScript] )
&:extend
needs less 1.4.0。那麼咕嚕/隱藏使用不同的編譯器?
更新 運行install grunt-contrib-less --save-dev
給出:
[email protected] node_modules/grunt-contrib-less
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
所以我希望少5.0上,但仍然得到這個錯誤
同樣的問題,因爲你的現在。你設法使它工作? – darksoulsong
對不起,我不知道。我運行Bootstrap 3.1.1。在這一刻。我只在3.0 RC1 –