less.js icon indicating copy to clipboard operation
less.js copied to clipboard

1.4.0 gets parse error on bootstrap mixins.less

Open ptte opened this issue 13 years ago • 7 comments

Getting ParseError on bootstrap mixins, confirmed that it was working in 1.3.3

Error

ParseError: Unrecognised input in /.../bootstrap/mixins.less on line 562, column 7:
561     .spanX (@index) when (@index > 0) {
562       (~".span@{index}") { .span(@index); }
563       .spanX(@index - 1);

Reproduce

Using bootstrap version 2.2.1

Create a compile file (lol.less)

// Core variables and mixins
@import "variables.less";
@import "mixins.less";

Compile it

lessc lol.less lol.css

Voila. Error.

ptte avatar Jun 11 '13 23:06 ptte

I suggest using 1.3.3 for Bootstrap 2.x. Alternatively you can update the mixin to work with 1.4.0.

jonschlinkert avatar Jun 11 '13 23:06 jonschlinkert

one of the bootstrap 2.x releases contains a fix for this. So the latest 2.x works in 1.4

lukeapage avatar Jun 12 '13 07:06 lukeapage

Yeah, actually what version of Bootstrap is this? I think this is 2.3.0, because this should be fixed in Bootstrap 2.3.1 (per @lukeapage's pull request that was merged)

jonschlinkert avatar Jun 12 '13 10:06 jonschlinkert

thanks @jonschlinkert for filling in the numbers!

lukeapage avatar Jun 12 '13 16:06 lukeapage

Hi guys, just to confirm replacing mixins.less from an old build of Bootstrap with the latest (2.3.2) fixes this issue.

Thanks very much for your help, all

juliotaylor avatar Aug 06 '13 15:08 juliotaylor

:+1: Thanks for the solution

nicolas-bastien avatar Sep 28 '13 08:09 nicolas-bastien

For those who want to manually update their mixin file themselves, simply update the string interpolation syntax:

screen shot 2014-01-06 at 12 16 27 pm

Found here within the 1.4.0 section (search for 'breaking changes').

JohnONeill avatar Jan 06 '14 17:01 JohnONeill