Start using LESS.js

It will save you time. This 4 minute video will help you under­stand how you can start using vari­ables in your CSS which will come in real handy if you want to change CSS prop­er­ties in one place and those changes will be repli­cated all through­out your site.

Chrome browser bug when working with Less.js

A cou­ple years ago a devel­oper I was work­ing with told me he wished that CSS would allow you to use vari­ables. Well, that’s exactly what Less.js enables you to do. It is really great but while test­ing in Chrome I couldn’t get it to work. I then found from this arti­cle that there is a known bug in Chrome if you path to your page starts with ‘file:///’

To solve this prob­lem, I just use XAMPP and throw my folder inside the htdocs folder and use ‘local­host’ instead of ‘file:///.

I also found that the URL to the google CDN of less.js is stored here:

so to ref­er­ence your css you should have some­thing like this:

Hope this post saves you the time I wasted try­ing to fig­ure out what I did wrong.