Normally we are intended to use “less” in conjunction with “free time”, just as “less free time for hobbies” or even “earning less money”, but in this case “LESS” means a great way to make content style sheets (css) dynamic.
When writing styles sheets we normally need to repeat and repeat and repeat the same stuff, reuse colors or calculate a lot values depending on others. Using LESS this is done dynamically. And the best: Its syntax follows valid css, so you don’t need to change any line of your code to port.
Another point is about minimizing web requests. Style sheets created with LESS won’t need to open up new connections – except for images and external fonts – , cause all imported style sheets will automatically be attached on the server side and reduce the page load.
Thanks to its simple structure usage is really easy (showing just the basics):
$less = new LESS(); // initialising $less->setBasePath(); // (optionally) setting a base path for absolute imports $less->setRestrictPath(); // (optionally) setting a path, which restricts import paths to outside $less->parse($content); // parse $content $less->parseFile($file); // parse the content of $file echo $less->output();