LESS Unofficial Ports
posted under category: CSS on September 9, 2011 at 12:00 am by Nathan
Something I enjoy about LESS is how its ecosystem is a microcosm of a lot of other more well known software ecosystems. There are competitors, contributors, and even ports to other languages. I'm going to talk about those ports today.
Aside from the original Ruby release and the subsequent Javascript browser/Node version which were both written by the creator, Alexis Sellier, there are these other ports.
First, there is LESSPHP. You'll never guess what language that ports to... QBasic! Nah just kidding. There is an obvious benefit to running LESS in PHP, mostly for the fact that your PHP application can now compile the LESS files at the server when they are requested. The JavaScript compiler is great, but doesn't work withthe oldest browsers, and some might take a second glance at having to download another .js file and compiling CSS in the browser. Running PHPLESS will let you get away from the need to eiher preprocess or postprocess your LESS source code. Also, you can invoke it from the command line, and it works just like the Ruby compiler but you only need PHP instead of Ruby.
The second unofficial port is DOTLESS, a port to... DOS batch files! No, just kidding again. Running a native LESS compiler in the CLR is fantastic if you are on Windows or doing .NET development. DOTLESS can run as a filter in IIS that intercepts all .less file requests and translates them on the fly. That also gives way for you to call it programmatically like through a build process, or from the command line in an EXE file, just like the Ruby or PHP command line programs.
Which one of these is better completely depends on what kind of development you do and where you do it. Both projects have their files hosted on GitHub, and they are both very active. It's just good to know there are options.