Retina.LESS Doesn't Compile #18

dubcanada opened this Issue Apr 24, 2012 · 7 comments


None yet
5 participants


Using the newest version of retina.less does not compile. If I go back to before the extra browsers where added it compiles fine (imulus#13).


ParseError: Syntax Error on line 8 in retina.less:2:5
1 // retina.less
2 // A helper mixin for applying high-resolution background images (

This is using the lessc bundler included in the newest repo version.

weyert commented May 3, 2012

Yes, I am experiencing the same issue when using less.js... Not sure how to fix this problem.


caseyohara commented May 3, 2012

@dubcanada @weyert We fixed this in this commit. The LESS compiler doesn't like the comma-chained media queries. For now we're going to focus on WebKit.

caseyohara closed this May 3, 2012

weyert commented Jun 1, 2012

For me this is still not working. If I am using the simpleless or then it or gives errors or just ignores the whole retina.less file.

May I ask what you use for compiling css files from less files?

weyert commented Jun 1, 2012

This occurs with the following version:

// retina.less
// A helper mixin for applying high-resolution background images (

.at2x(@path, @w: auto, @h: auto) {
    background-image: url(@path);
    @at2x_path: ~`"@{path}".split('.').slice(0, "@{path}".split('.').length - 1).join(".") + "@2x" + "." + "@{path}".split('.')["@{path}".split('.').length - 1]`;

    @media all and (-webkit-min-device-pixel-ratio : 1.5) {
        background-image: url(@at2x_path);
        background-size: @w @h;

@weyert We use the standard lessc compiler which you can install via npm ( It works well across all platforms. For npm you'll need node.js (

weyert commented Jun 1, 2012

I will try that out. :)

I am also having this issue. As soon as I add this mixin to my project, it stops compiling the less code.

I am using as the compiler, in browser until the project is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment