You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lessphp is a compiler for LESS written in PHP. The documentation is great,
so check it out: https://leafo.net/lessphp/docs/.
Here's a quick tutorial:
How to use in your PHP project
The only file required is lessc.inc.php, so copy that to your include directory.
The typical flow of lessphp is to create a new instance of lessc,
configure it how you like, then tell it to compile something using one built in
compile methods.
The compile method compiles a string of LESS code to CSS.
An additional script has been included to use the compiler from the command
line. In the simplest invocation, you specify an input file and the compiled
css is written to standard out:
$ plessc input.less > output.css
Using the -r flag, you can specify LESS code directly as an argument or, if
the argument is left off, from standard in:
$ plessc -r "my less code here"
Finally, by using the -w flag you can watch a specified input file and have it
compile as needed to the output file:
$ plessc -w input-file output-file
Errors from watch mode are written to standard out.
The -f flag sets the output formatter. For example, to compress the
output run this: