D
D
Dmitry Karassev2012-10-12 23:46:59
css
Dmitry Karassev, 2012-10-12 23:46:59

Convenient LESS-file compiler to CSS code?

The essence of my question is expanded by the fact that I write on SublimeText-2. Used LESS to CSS compiler from git://github.com/berfarah/LESS-sublime-build.git repository a couple of months ago. Everything was like in a fairy tale. But I could not constantly use it due to being busy on the main project. But today I decided to introduce LESS into the main development process. However, the compiler complains about even the smallest files...
LESS:

//
// Grid system
// --------------------------------------------------


// Fixed (940px)
#grid > .core(@gridColumnWidth, @gridGutterWidth);

// Fluid (940px)
#grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);

// Reset utility classes due to specificity
[class*="span"].hide,
.row-fluid [class*="span"].hide {
  display: none;
}

[class*="span"].pull-right,
.row-fluid [class*="span"].pull-right {
  float: right;
}

Error:
#grid > .core is undefined on line 7 in file 'Z:\home\foundation\www\assets\less\grid.less':
[6]: // Fixed (940px)
[7]: #grid > .core(@gridColumnWidth, @gridGutterWidth);
^
[8]: [Done]
Everyone is saddened by the fact that there is a lot of bootstrap code to work with. And a wagon of errors. Compilation is needed when building the final code. Compile on the server side, client side is not possible. How can the problem be solved?
I would be very grateful to habro-residents for their help!
UPD: Wearekiss.com/simpless was discovered
But it could not be started on Ubuntu 12.04 - if anyone can install, please unsubscribe.

Answer the question

In order to leave comments, you need to log in

7 answer(s)
Y
YaPravda, 2012-11-16
@Skerrigan

You don't have @gridColumnWidth, @gridGutterWidth variables defined, of
course, the grid is built on variables, and if there is no input, there is nothing to build .
you just had to define them in the header of the loess, for example like this:
@gridColumnWidth: 60px; @gridGutterWidth: 20px;

V
Vladimir, 2012-10-13
@de1vin

I build less on the client side during development. And only after the project is launched, I already compile it into css and include

S
skorney, 2012-10-13
@skorney

I would like to add to the question, what is the most convenient way to compile if I work in JetBrains PHP/WebStorm?

V
Vadim, 2013-01-02
@vshemarov

Available in pure PHP - leafo.net/lessphp/
Bootstrap compiles with a bang. Work from the command line is also provided

E
Ernest, 2013-05-29
@Ernest

Tried lessphp
Bootstrap compiled without errors BUT
With Winless the compiled file is (compessed) 157 kilobytes and lessphp is also (compessed) 236 kilobytes. The difference is significant.
I don't understand anything. All in one line, ANSI encoding. WINLESS rules groups?
It's hard to check in one line.

P
Pavel Belousov, 2014-04-05
@PafNutY

Try prepros

R
Rumyantsev Evgeniy, 2014-04-28
@ChezRD

I once wrote a solution for myself for recursively building less into one file. Fast

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question