Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixins parse error : Unrecognised input with twitter/bootstrap latest master #376

Closed
neilime opened this issue Feb 23, 2013 · 6 comments
Closed

Comments

@neilime
Copy link

neilime commented Feb 23, 2013

I got this error on line 578 when i try to compile mixins.less file (latest master) :

    .spanX (@index) when (@index > 0) {
      .span{@index} { .span(@index); } // Here is the error
      .spanX(@index - 1);
    }

Lessphp version used : latest master

@Handfeger
Copy link
Contributor

The Code should be like this:

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

This is how it is documented http://leafo.net/lessphp/docs/#selector_expressions

@neilime
Copy link
Author

neilime commented Feb 23, 2013

But this code is from twitter/bootsrap and it works with less.js

@leafo
Copy link
Owner

leafo commented Feb 23, 2013

You sure you are on master? I fixed this issue a little while ago ee5b675

@neilime
Copy link
Author

neilime commented Feb 23, 2013

Yes I saw that a patch has been made, but when I run the test below with the latest master version, I got this error :
Uncaught exception 'Exception' with message 'parse error: failed at{ .span(@Index); } line: 6'

include 'leafo/lessphp/master/lessc.inc.php';
$oLessc = new lessc();
$oLescc = $oLessc->compile('
.span (@columns) {
  width: @columns;
}
.spanX (@index) when (@index > 0) {
  .span{@index} { .span(@index); } // Here is the error
  .spanX(@index - 1);
}
');

@leafo
Copy link
Owner

leafo commented Feb 23, 2013

You have a syntax error, it's @{index} instead of {@index}. Fails even in lessjs.

@neilime
Copy link
Author

neilime commented Feb 25, 2013

You're right, I don't know why I have this error in the code. Sorry for this useless issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants