简体   繁体   English

为什么SASS被弃用以支持SCSS?

[英]Why was the SASS deprecated in favour of SCSS?

Basically, why SCSS, instead of SASS? 基本上,为什么SCSS,而不是SASS? The shorthand of SASS was the main reason why I picked up SASS, I recently came back to it and realised that it is no longer in favour. SASS的简写是我拿起SASS的主要原因,我最近回到它并意识到它不再受欢迎了。 Any reasons why? 有什么原因吗?

Sass has two syntaxes. Sass有两种语法。 The new main syntax (as of Sass 3) is known as “SCSS” (for “Sassy CSS”), and is a superset of CSS3's syntax. 新的主要语法(从Sass 3开始)被称为“SCSS”(用于“Sassy CSS”),并且是CSS3语法的超集。 This means that every valid CSS3 stylesheet is valid SCSS as well. 这意味着每个有效的CSS3样式表也是有效的SCSS。 SCSS files use the extension .scss. SCSS文件使用扩展名.scss。

The second, older syntax is known as the indented syntax (or just “Sass”). 第二种较旧的语法称为缩进语法(或仅称为“Sass”)。 Inspired by Haml's terseness, it's intended for people who prefer conciseness over similarity to CSS. 受Haml的简洁启发,它适用于那些喜欢与CSS相似的简洁性的人。 Instead of brackets and semicolons, it uses the indentation of lines to specify blocks. 它使用行的缩进来指定块,而不是括号和分号。 Although no longer the primary syntax, the indented syntax will continue to be supported. 虽然不再是主要语法,但将继续支持缩进语法。 Files in the indented syntax use the extention .sass. 缩进语法中的文件使用扩展名.sass。

Source: http://sass-lang.com/ 资料来源: http//sass-lang.com/

If you like sass more than scss you are free to use it! 如果你喜欢sass而不是scss,你可以自由使用它! scss is for people who don't like the indented syntax. scss适用于不喜欢缩进语法的人。 And it is extremely easy to convert a css file to scss beacause scss is a superset of css. 并且将css文件转换为scss非常容易,因为scss是css的超集。

That it is no longer in favor is probably because the developers like scss more. 它不再受欢迎可能是因为开发人员更喜欢scss。 But this is a matter of taste. 但这是一个品味问题。 I personally still prefer sass. 我个人还是喜欢sass。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM