Reputation: 2415
I am on a NodeJS project on Webstorm. I have installed the less module using npm but I cant get the lessc compiler to run. The file watcher has been set, and the css file is generated from the .less file and can be seen the navigation panel but the css file is empty.
Sometimes it updates randomly and shows some code, but often, when I change the less file and then right click > comipile to css, nothing happens.
I am not even sure where to start diagnosing this problem. Please advise.
Upvotes: 0
Views: 390
Reputation: 2415
It turns out, less compiler does not compile parametric rulesets, which is how i declared all of them.
Here's a ruleset for buttons. You would imagine, the less compiler would convert this to a css ruleset "button", but it doesn't do that. A ruleset has to be declared without parameters to be compiled.
.button(@color:@crimson-red){
border-radius: 3px;
border-style: none;
background-color: @color;
}
Upvotes: 1