3

I add some code to mixins.less:

 img {   &:extend(.img-responsive); }

See also: Images not responsive by default in Twitter Bootstrap 3? and https://stackoverflow.com/a/15573240/1596547

When i run grunt dist from the command line i got:

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.

But when i compile it with Lessc: lessc bootstrap.less i don't find an error. (lessc 1.4.2 (LESS Compiler) [JavaScript] )

&:extend needs Less 1.4.0. So grunt / recess use a different compiler?

update running install grunt-contrib-less --save-dev gives:

[email protected] node_modules/grunt-contrib-less
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

so i expect less v1.4.2 but still got this error

Community
  • 1
  • 1
Bass Jobsen
  • 48,736
  • 16
  • 143
  • 224

1 Answers1

0

It depends on the version of grunt-contrib-less you have.

Run:

npm update grunt-contrib-less
Paul
  • 139,544
  • 27
  • 275
  • 264
  • thank for your response. I tried but still got the same error – Bass Jobsen Jul 29 '13 at 23:29
  • Your gruntfile is still referring to recess for how to compile the less. That will need to be updated as well, or it will still use recess to compile. – Case Oct 15 '13 at 20:30