LESS css - JS Parser vs Compiled

2019-06-23 22:31发布

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

标签: css less
2条回答
我只想做你的唯一
2楼-- · 2019-06-23 22:58

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...

查看更多
Viruses.
3楼-- · 2019-06-23 23:01

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

查看更多
登录 后发表回答