为什么要使用Sass(而不是SCSS)? [英] Why use Sass (not SCSS)?

查看:254
本文介绍了为什么要使用Sass(而不是SCSS)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个人—我正在查看有关960网格系统的最新演示文稿, 刷新OKC– 2011年4月19日 ,并在倒数第二张幻灯片(101/102)上,该人员建议如果您要使用Sass,请使用Sass,而不是SCSS。鉴于SCSS是新的主要语法,为什么比SCSS更喜欢Sass?

everyone — I was looking over a recent presentation on 960 Grid System, Refresh OKC – April 19th 2011, and on the penultimate slide (101/102), the guy recommends "if you're going to use Sass, use Sass, not SCSS." Given that SCSS is the new main syntax, why prefer Sass to SCSS? Is it simply a preference for conciseness over similarity to CSS, or is there a real reason for using Sass, not SCSS?

推荐答案

我想不出很好的理由:)

I can't think of a good reason :)

我看了看整个幻灯片,演讲者(他也与SASS项目有联系,我想无论如何?)是使用您所知道的来完成的思维定势

I looked at the whole set of slides, I think the presenter (who is also a connected to the SASS project, I think anyway?) is of the mindset to use what you know to "get 'er done"

Sass 应该更短,更简洁演讲者可能完全了解Sass,但是从10多年的CSS读写经验来看,我发现 SCSS 更加直观。我不必学习Sass缩进规则,并且SCSS和CSS中的括号为嵌套提供了直观的缩进线索-这与大多数其他语言都非常相似,因此任何编程/编码背景的人都应该熟悉关闭巢穴?

Sass is supposedly shorter and more concise and it's possible that the speaker knows Sass inside out, but speaking from personal experience having read and written CSS for over 10 years I find SCSS much more intuitive. I do not have to learn the Sass indentation rules, and the brackets in SCSS and CSS provide visual indentation clues for nesting - which is very like most every other language uses, so anyone from a programming/coding background would be familiar with the idea of closing the nests??

..更重要的是,每个有效的CSS都已经是有效的SCSS,因此无需转换即可开始使用它-例如我能够提取我的Drupal工作表(全部29个!),更改它们的扩展名,并在很短的时间内重新编译/压缩它们。.从那时起,我就可以一次提取一小块并断言它,使用嵌套等。我仍然喜欢看到方括号和分号,这无关紧要,无论如何,一旦编译完成就可以使用!

.. more importantly every valid CSS is already a valid SCSS so no conversion needed to start using it - e.g. I was able to take my Drupal sheets (all 29 of them!), change their extension and recompile/compress them in very little time.. since then I've been able to take a little chunk at a time and "Sassify" it, using nesting etc. and I still like to see the brackets and semi-colons, it matters not, which you use once it's all compiled anyway!

恕我直言,Sass本身对于大型项目(现有的项目,即未从头开始构建/确定的项目)的进入门槛太高,因为可以将其模块化SCSS

IMHO Sass itself is too high a barrier to entry for a large project (existing one, i.e. one not built/sassified from scratch), where as it can be modularised with SCSS

因此,要遵循原始作者的想法(而不是辩论赞成和反对的观点),我将继续使用我熟悉的TYVM:)

So to follow the original author's (of the slideshow) thinking rather than debate pro's and cons I'll just keep using the one I know TYVM :)

这篇关于为什么要使用Sass(而不是SCSS)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆