TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: SCSS/Sass vs. LESS

7 点作者 jrub将近 11 年前
In talking to other web designers&#x2F;developers, reading blog posts, and seeing &quot;Show HN&quot; posts, it seems that there are a lot of people who prefer SCSS&#x2F;Sass over LESS.<p>There are large projects that use both technologies, such as Bootstrap (LESS) and Jekyll (SCSS&#x2F;Sass) just to name a couple.<p>However, it seems like on a project-to-project basis, people tend to prefer to use Sass over LESS. I&#x27;ve heard some vague reasons why (such as looping and proper mixin&#x2F;&quot;method&quot; calls in Sass) but never anything very concrete and compelling enough for me to understand the reasoning behind choosing one over the other.<p>Even more than the apparent popularity of SCSS&#x2F;Sass is the apparent visceral hatred of the &quot;other&quot; system by users of it&#x27;s &quot;competitor.&quot; This seems to be more prevalent in the SCSS&#x2F;Sass community (towards LESS), but I&#x27;ve seen it pointed in the other direction too.<p>So I turn to y&#x27;all; what are the reasons you choose SCSS&#x2F;Sass or LESS for a project. Is it a simple matter of whichever technology you were exposed to first, and as such have a comfort with it and little reason to test the waters? Are you handcuffed into the system you use due to previous project decisions? Are there actual technical&#x2F;usability reasons you know of that makes one better than the other? I&#x27;m really interested to know!<p>I myself use LESS, mostly because it&#x27;s what I picked up first and have no significant use case where I had to switch to Sass (except for when using projects like Jekyll, which support Sass as a first class&#x2F;the only citizen).

11 条评论

hajile将近 11 年前
You will probably need to use node js anyway for other is build tools, but won&#x27;t need ruby unless you use rails. Reduce your build to dependencies and use less.<p>That said, I recommend you look into stylus. It is better than either less or sass in my opinion as it gets rid of a lot of unnecessary syntax.<p><a href="https://learnboost.github.io/stylus/" rel="nofollow">https:&#x2F;&#x2F;learnboost.github.io&#x2F;stylus&#x2F;</a>
评论 #8174285 未加载
tannerj将近 11 年前
I started with LESS (Bootstrap) and couldn&#x27;t make the column gutters collapse. I did some research, found that I could do that in Zurb Foundation so I started using foundation. It was that simple difference that caused me to go with SASS over LESS. I actually wasn&#x27;t doing anything custom in either framework at first, but once I wanted to start customizing the framework I started learning SASS and really like it. I&#x27;ve also been learning ruby&#x2F;rails and it&#x27;s nice that its written in the same language. I&#x27;ve now dropped the idea of a huge framework and have been learning compass and susy with sass and I really like that solution as opposed to an entire framework. I think both LESS and SASS are great and valid solutions to the problem. At this point it&#x27;s just preference.<p>edited for clarity
MalcolmDiggs将近 11 年前
I think much of the valid &quot;us vs them&quot; arguments came in the pre-SCSS days. Back then SASS was <i>NOT</i> a superset of css, while LESS was. So choosing between them could lead to very different codebases &#x2F; workflows. These days they are both supersets (or rather, SCSS is a superset, you know what I mean), and they have many of the same options available, so IMHO the differences are trivial.
ceejayoz将近 11 年前
FYI, Bootstrap has an official SCSS version as well as the LESS one. <a href="https://github.com/twbs/bootstrap-sass" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;twbs&#x2F;bootstrap-sass</a>
poseid将近 11 年前
I like LESS recently, since it is NodeJS (= fast and easy to setup)
akvlad将近 11 年前
I think the big reason people prefer SASS is because of Compass - <a href="http://compass-style.org/" rel="nofollow">http:&#x2F;&#x2F;compass-style.org&#x2F;</a>
Spoom将近 11 年前
I prefer LESS since its syntax is essentially a superset of CSS.<p>I&#x27;d still be interested in hearing the arguments in favor of SASS.
评论 #8173067 未加载
mmset将近 11 年前
I use LESS because easy very easy to compile with node.js. Not to disregard the fact that Bootstrap 3 is LESS bound.
评论 #8173069 未加载
评论 #8173105 未加载
sehr将近 11 年前
LESS. I don&#x27;t enjoy logic in stylesheets and having to mess with Ruby mucks up most JS based build systems IMO
hcarvalhoalves将近 11 年前
Myself I prefer LESS since it&#x27;s closer to CSS.<p>I believe most people using SASS do because of Rails.
评论 #8174147 未加载
drakmail将近 11 年前
I&#x27;m use SASS, because it&#x27;s default for Rails.