1

I'm using the {less} compiler (http://incident57.com/less/) with Coda 1.7.2 (first time trying this!)

{less} gives me a success message, but still my .css file is blank!

My less file: main.less
My css file: main.css
*both files are in the same directory: root/css/

I have {less} set to auto-compile on save, and have also tried on manually compiling (Compile All button).

I have a screenshot here: http://d.pr/i/AEKa

I'm trying to test this with very little in my .less file just to try to get it to work at all:

// Colors
@black: #000;
@grayLighter: #eee;

body {
    background-color: @black;
    background-color: @grayLighter;
}

But I get nothing, my .css file remains blank....

Any ideas on this?

ByteMyPixel
  • 151
  • 2
  • 3
  • 15

1 Answers1

1

This code will not produce anything in CSS, because CSS is not supporting variables. You will have to use them somewhere in order to see a result.

Try adding something like this in the end of the file and see your compiled CSS:

body {
    background-color: @black;
    background-color: @grayLighter;
}
Lipis
  • 21,388
  • 20
  • 94
  • 121
  • Thanks Lipis, and sorry that was silly of me, I guess I reduced my .less a little file too much for testing ;) But nonetheless, it still doesn't compile with the supporting variables; I appended your suggested code above to the end of my main.less file, compiled main.less in the {less} compiler, and my main.css file is still blank.... I will modify my code above to reflect my changes. – ByteMyPixel Feb 18 '13 at 20:23
  • It works here: http://winless.org/online-less-compiler so something is wrong or maybe not recompiled. Try to compile it manually (if I remember right there is button for that) – Lipis Feb 18 '13 at 20:26
  • Thanks for pointing me to that tester, it does indeed work there. When I manually compile (using the compile all button) I still get nothing. Very strange... – ByteMyPixel Feb 18 '13 at 20:29
  • @ByteMyPixel make sure that you're compiling the right file.. restart the app (maybe some weird caching) not sure what else can go wrong. You could also try the [CodeKit](http://incident57.com/codekit/) it's from the same company maybe that will work better for you – Lipis Feb 18 '13 at 20:31
  • @ByteMyPixel But it's not free as I can see.. :/ – Lipis Feb 18 '13 at 20:32
  • I tried restarting {less} and Coda to be sure, tested again and still no luck :( I'll check out CodeKit, thank you! – ByteMyPixel Feb 18 '13 at 20:34
  • Uninstalled/Reinstalled {less} and it's working fine now. Thanks again Lipis for your help troubleshooting this! – ByteMyPixel Feb 18 '13 at 21:05
  • Uninstall/Reinstall. That's the ultimate solution with this software. –  Sep 02 '14 at 09:21