HAML 可以与 Less.js 一起使用吗?
我意识到使用 HAML/Sass 组合将会得到大力支持。我读了很多书,并从中获得了优势。
话虽如此,我真的很喜欢 Less.js 及其对事物的看法。有什么原因导致我无法将其与 HAML 并行运行吗?
谢谢,欢迎提供轶事经验。
I realize that there's going to be big support for utilizing the HAML/Sass combo. I've done tons of reading and I get the advantages.
With that said, I really like Less.js and its take on things. Is there any reason I can't run it side by side with HAML?
Thanks, and anecdotal experience is welcomed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
简短的回答是肯定的。当我问这个问题时,主要的陷阱似乎是与 Sass 相比,LESS 预编译的容易程度。现在已经有很好的解决方案,而且它不再是一个主要障碍。
The short answer is yes. The major pitfalls at the time I asked this question seemed to be around the ease of having LESS precompiled vs. Sass. Good solutions exist for this now, and it's no longer a major barrier either way.
我想这取决于你使用的是什么,Java、Python 或 PHP 框架等。
I guess that would depend on what you're using, Java, Python, or PHP frameworks, etc.
使用带有新资产管道的 Rails 3.1,less gem 使得使用 Rails 中的 less 变得容易,您甚至可以执行诸如 blah.css.less.erb 之类的操作。
或者您是否正在为内联 CSS 寻找 :less 块,就像 javascript 和 css 一样?
With Rails 3.1 with the new assets pipeline the less gem makes using less from Rails easy, you can even do things like blah.css.less.erb.
Or are you looking for a :less block for inline CSS like you have for javascript and css?