Back to Top

Client-Side Usage OF Less

Updated 16 December 2016

To use Less for web developing we need to install node.js package manager on our server after that we have to compile the .less file to the css file through the command-line. But with the help of Client-Side we do not have to compile .less file to css file again and again. We can compile the less code to the actual css code withe help of less.js file. We just need to download the less.js from https://github.com/less/less.js/archive/master.zip or we use the CDN for less.js <script src=“//cdnjs.cloudflare.com/ajax/libs/less.js/2.7.1/less.min.js”></script>. we just need to link the less file just above the less.js included position and after every refresh less.js compile the less code to the actual css code.

screenshot_1

This Client-Side usages is only for the development not for the production as in every page refresh less.js calls a ajax request to compile the less code so it may slow your production site. So you can pre compile the less code with the online less compiler i.e http://less2css.org/

screenshot_2

Searching for an experienced
Opencart Company ?
Find out More
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home