Skip to content

Instantly share code, notes, and snippets.

@kontur
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kontur/48fc207097fbfebbfea5 to your computer and use it in GitHub Desktop.
Save kontur/48fc207097fbfebbfea5 to your computer and use it in GitHub Desktop.
Odd less @import error when *not* using colons after @ımport statement
body {
// surprisingly this will not throw an error, but it won't import the file neither
.mx({ @import: "test2.less"; });
}
body {
// this will throw an error:
// SyntaxError: Cannot read property 'rules' of undefined in /Users/johannes/test/less-bug/test.less on line 7, column 3:
// 6 body {
// 7 .mx({ @import "test2.less"; });
// 8 }
.mx({ @import "test2.less"; });
}
.mx(@declarations) {
@declarations();
}
border: 1px solid red;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment