Search code examples
twitter-bootstrap-3dotless

Dotless failing to compile ; in Bootstrap 3 less source


I use dotless 1.3.1.0 compiling less-files. This worked fine with bootstrap 2.x, but after switching to bootstrap 3.0.0 (downloaded the source from here: http://getbootstrap.com/getting-started/), I suddenly get this error:

Expected ')' but found ' ' on line 47 in file 'mixins.less': [46]: // Sizing shortcuts [47]: .size(@width; @height) { ------------^ [48]: width: @width;

Seems that having a ; as seperator between parameters is not valid less. The original source in the mixins.less looks like this:

...
// Sizing shortcuts
.size(@width; @height) {
  width: @width;
  height: @height;
}
...

Do I have to use an updated less compiler? Or did bootstrap release buggy less source?

UPDATE 1: I can see, that a pull request for dotless exists, fixing the problem with ;

https://github.com/dotless/dotless/pulls "Fixes for ; not supported in mixin parameter lists #319 #320"

I will go using the css files until this has been fixed in dotless.


Solution

  • One of my colleagues that uses dotless has had a few fixes for Bootstrap 3 issues merged. Apparently Bootstrap3 will now compile with the latest code :)

    https://github.com/dotless/dotless/commits/master

    I expect an updated NuGet package will be available soon (based on this tweet)