Retina.LESS Doesn't Compile #18

Closed
dubcanada opened this Issue Apr 24, 2012 · 7 comments

Comments

Projects
None yet
5 participants

Hey,

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).

Error

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

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.

Contributor

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 http://wearekiss.com/simpless or https://github.com/duncansmart/less.js-windows 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 (http://www.retinajs.com)

.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 (http://lesscss.org/#-server-side-usage). It works well across all platforms. For npm you'll need node.js (http://nodejs.org/).

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 https://github.com/cloudhead/less.js 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