Use LESSCSS Client Side While Developing WordPress Theme

I write in LESSCSS because I find it’s nesting so much eaiser to read. While creating a theme, I never compile during, it’s too annoying, instead I have a on/off toggle for using .LESS file or .CSS file.

https://gist.github.com/davidsword/a3760b1ae2e00802c677ea2a66132f08

In the snippet I made the toggle WP_DEBUG, which should be on while you develop, but if you’re developing in a network it’s eaiser to use a global veriable from functions.php

Furthermore if you are using LESSCSS and are developing/maintaining a lot of WordPress themes, I highly suggest making a shortcut for LESSCSS in bash:

https://gist.github.com/davidsword/71e290a3afd296e841bca3f33099d5e2

So all you have to do is type less when you’re in the theme directory. If you’re not comfortable with terminal, I’ve written about a PHP LESSCSS Compiler.