I already found this question: lessc returns empty CSS file but it did not help. I am using Mac OS X Yosemite. I have those packages installed:
$ npm list -g --depth=0
/usr/local/lib
├── bower@1.3.12
├── grunt-cli@0.1.13
├── gulp@3.8.10
├── learnyounode@2.3.3
├── less@2.4.0
├── n@1.2.13
└── npm@1.2.15
But when I try
$ lessc style.less > style.css
it only creates an empty css file. I downloaded SimpleLESS now and there the same .less-file gets compiled properly.
What am I doing wrong?
I tried the example from lesscss.org for the file style.less:
@base: #f938ab;
.box-shadow(@style, @c) when (iscolor(@c)) {
-webkit-box-shadow: @style @c;
box-shadow: @style @c;
}
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
.box-shadow(@style, rgba(0, 0, 0, @alpha));
}
.box {
color: saturate(@base, 5%);
border-color: lighten(@base, 30%);
div { .box-shadow(0 0 5px, 30%) }
}
I use lessc 2.4.0:
$ lessc --version
lessc 2.4.0 (Less Compiler) [JavaScript]