When I heard about LESS, I originally thought that they’re usually pre-processed into css files, so browsers just encounter CSS files, not LESS files.
However, using LESS plugin for Play Framework, I just saw that my Chrome browser actually reads and interprets LESS files. LESS is claimed to be supported in all major browsers. So, do modern websites just serve LESS files, or do they pre-compile them into CSS? How does the LESS plugin work in Play Framework? Does it inject a Javascript snippet that interprets them client side?
What’s actually happening here?
If you’re using the Lunatech LESS plugin for Play! 1, it looks like it actually compiles the
lessfiles on the fly using Asual LESS and then serves it statically. An excerpt:Where
lessEngineis acom.asual.lesscss.LessEngineinstance.Like others have pointed out, the more common ways of using LESS is to compile them yourself before serving content, or using the lesscss JavaScript plug-in to have the client compile them at runtime.