from.. 2011-04-13 19:23 采纳率: 100%
浏览 624
已采纳

Scss 和 Sass 的区别是什么?

From what I've been reading, Sass is a language that makes CSS more powerful with variable and math support.

What's the difference with SCSS? Is it supposed to be the same language? Similar? Different?

转载于:https://stackoverflow.com/questions/5654447/whats-the-difference-between-scss-and-sass

  • 写回答

13条回答 默认 最新

  • 狐狸.fox 2011-04-13 19:25
    关注

    Sass is a CSS pre-processor with syntax advancements. Style sheets in the advanced syntax are processed by the program, and turned into regular CSS style sheets. However, they do not extend the CSS standard itself.

    The main reason for this is the addition of features that CSS painfully lacks (like variables).

    The difference between SCSS and Sass, this text on the Sass documentation page should answer the question:

    There are two syntaxes available for Sass. The first, known as SCSS (Sassy CSS) and used throughout this reference, is an extension of the syntax of CSS. This means that every valid CSS stylesheet is a valid SCSS file with the same meaning. This syntax is enhanced with the Sass features described below. Files using this syntax have the .scss extension.

    The second and older syntax, known as the indented syntax (or sometimes just “Sass”), provides a more concise way of writing CSS. It uses indentation rather than brackets to indicate nesting of selectors, and newlines rather than semicolons to separate properties. Files using this syntax have the .sass extension.

    However, all this works only with the Sass pre-compiler which in the end creates CSS. It is not an extension to the CSS standard itself.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(12条)

报告相同问题?

悬赏问题

  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入