Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LESS css - JS Parser vs Compiled

Tags:

css

less

I was wondering if anyone knew if the JS interpreter for LESS css causes any noticeable delays in page loading. I would prefer to use the JS parser simply because it's easier to use, since I won't have to run the compiler after every edit and easier to manage the source code as SCM tools won't be tracking both the .less and .css files

like image 262
wyqydsyq Avatar asked May 03 '12 01:05

wyqydsyq


2 Answers

Its not slow on fast computers/browsers. However depending on your target audience I wouldn't use it.

I would rather setup lessc to watch a file/directory and generate css files on save. And then commit both the less and the css files to your SCM (that is infact what I do).

Also doing it this way allows for continuous integration builds.

http://en.wikipedia.org/wiki/Continuous_integration

like image 136
Petah Avatar answered Oct 17 '22 19:10

Petah


I would also suggest parse LESS styles into normal CSS. There're still people who have JS turned OFF or who use some JS-blocking addons. In such case, you'll get unstyled page, which is not the best way to impress your audience.

If you're on Mac - try Less.App If you're on Windows - try WinLess If you're on Linux - try SimpleLess

All applications have an Option to "watch directory" (with LESS styles) and compile automatically if changed. Less.App & WinLess have a lot of other options like: compile minified, start with system, start minimized, etc...

like image 35
V-Light Avatar answered Oct 17 '22 21:10

V-Light