Anna K.
Anna K.

Reputation: 1995

Is it possible to get less CSS from lessphp compiler?

require "lessc.inc.php";
$less = new lessc;
$css = $less->compileFile("style.less");

so I get CSS code. Is it possible to get the compiled file, but in less format?

The reason I want that is because style.less uses imports:

@import "color.less";

And I want a .less file that includes all the less code from these imports.

Upvotes: 0

Views: 123

Answers (1)

Tigran Petrossian
Tigran Petrossian

Reputation: 1168

What you need is actually combining, not compiling (or converting into CSS, if you will).

I believe there's no specific LESS-targeted tool that does this, but with some customization you can use file combining tools like this - A PowerShell Script for Combining Files

Upvotes: 3

Related Questions