2

I'm trying to make the assetic:dump in my Symfony2 application. But I'm getting the error below.

ParseError: Unrecognised input in /home/vozi/webapp/vendor/duo/cms-bundle/Duo/CMSBundle/Resources/public/vendor/bootstrap/2.0.2/src/less/mixins.less on line 519, column 3:
518
519   .core (@gridColumnWidth, @gridGutterWidth) {
520

ParseError: Unrecognised input in /home/vozi/webapp/vendor/duo/cms-bundle/Duo/CMSBundle/Resources/public/vendor/bootstrap/2.0.2/src/less/mixins.less on line 519, column 3:
518
519   .core (@gridColumnWidth, @gridGutterWidth) {
520

The error is returned when the lines below are processed.

// The Grid
#grid {

  .core (@gridColumnWidth, @gridGutterWidth) {

    .spanX (@index) when (@index > 0) {
      (~".span@{index}") { .span(@index); }
      .spanX(@index - 1);
    }
    .spanX (0) {}

    .offsetX (@index) when (@index > 0) {
      (~".offset@{index}") { .offset(@index); }
      .offsetX(@index - 1);
    }
    .offsetX (0) {}

    .offset (@columns) {
      margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
    }

    .span (@columns) {
      width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
    }

    .row {
      margin-left: @gridGutterWidth * -1;
      .clearfix();
    }

    [class*="span"] {
      float: left;
      margin-left: @gridGutterWidth;
    }

    // Set the container width, and override it for fixed navbars in media queries
    .container,
    .navbar-fixed-top .container,
    .navbar-fixed-bottom .container { .span(@gridColumns); }

    // generate .spanX and .offsetX
    .spanX (@gridColumns);
    .offsetX (@gridColumns);

  }

  .fluid (@fluidGridColumnWidth, @fluidGridGutterWidth) {

    .spanX (@index) when (@index > 0) {
      (~"> .span@{index}") { .span(@index); }
      .spanX(@index - 1);
    }
    .spanX (0) {}

    .span (@columns) {
      width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
    }

    .row-fluid {
      width: 100%;
      .clearfix();
      > [class*="span"] {
        float: left;
        margin-left: @fluidGridGutterWidth;
      }
      > [class*="span"]:first-child {
        margin-left: 0;
      }

      // generate .spanX
      .spanX (@gridColumns);
    }

  }

  .input(@gridColumnWidth, @gridGutterWidth) {

    .spanX (@index) when (@index > 0) {
      (~"input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index}") { .span(@index); }
      .spanX(@index - 1);
    }
    .spanX (0) {}

    .span(@columns) {
      width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10;
    }

    input,
    textarea,
    .uneditable-input {
      margin-left: 0; // override margin-left from core grid system
    }

    // generate .spanX
    .spanX (@gridColumns);

  }

}

Anyone knows the root cause of my problem. I'm newer in Symfony and Less.

sgress454
  • 24,870
  • 4
  • 74
  • 92
Victor
  • 8,309
  • 14
  • 80
  • 129
  • 1
    What less parser are you using? – Chase Apr 02 '14 at 23:08
  • node.js: lessc 1.7.0 (LESS Compiler) [JavaScript] – Victor Apr 02 '14 at 23:09
  • I believe there is a syntax error. But I don't know where. – Victor Apr 02 '14 at 23:10
  • older less compilers had issues with `(~".offset@{index}")` where the ~ was inside – Chase Apr 02 '14 at 23:12
  • Well if you are using the 1.7.0 version then that is not your issue. what are `@gridColumnWidth` and `@gridGutterWidth` defined as? – Chase Apr 02 '14 at 23:14
  • I don't find the definition. I don't know the less syntax. But when I comment this line `(~".span@{index}") { .span(@index); }` the problem is solve, not all, but this error is solve. – Victor Apr 02 '14 at 23:17
  • what are is config for assetic? can you add it to the question? – Chase Apr 02 '14 at 23:22
  • 5
    Bootstrap 2.0.x is incompatible with recent Less versions (since v1.3.3). `(~"@{var}")` syntax is deprecated in favor of `@{var}`. Upgrade to Bootstrap 3 or manually fix the grid mixins by replacing `(~".span@{index}")` with `.span@{index}` etc.. – seven-phases-max Apr 03 '14 at 01:37
  • @seven-phases-max, please could your add your comment as an answer so this question can be accepted? – Bass Jobsen Sep 14 '14 at 19:24
  • @Bass Jobsen, I guess I'll better vote to close this as a duplicate of http://stackoverflow.com/q/19553367 to not increase entropy. – seven-phases-max Sep 14 '14 at 19:31
  • @seven-phases-max, yes that's a better option! thanks – Bass Jobsen Sep 14 '14 at 21:42

0 Answers0