【问题标题】:Is there a difference between sass and scss? [duplicate]sass 和 scss 有区别吗? [复制]
【发布时间】:2013-05-28 07:38:29
【问题描述】:

我为网站的 CSS 开发了一些带有 .scss 脚本的 ruby​​ 应用程序。但我遇到了一个使用 .sass 的新 ruby​​ 应用程序。 这种变化有什么好处或需要注意的地方吗?

【问题讨论】:

    标签: css ruby sass


    【解决方案1】:

    它们在功能上是等效的,但语法不同。来自SASS homepage

    [...] 它们之间没有功能上的区别。使用您喜欢的语法。

    【讨论】:

      【解决方案2】:

      SASS 和 SCSS 是一回事,但是使用了两种不同的语法。

      【讨论】:

      • @downvoter,敢解释吗?
      【解决方案3】:

      Sass 是一种更简洁的方式来制作 Scss:

      ..Older syntax is known as the indented syntax (or just “.sass”). Inspired by Haml’s terseness, it’s intended for people who prefer conciseness over similarity to CSS. Instead of brackets and semicolons, it uses the indentation of lines to specify blocks. Files in the indented syntax use the extension .sass.

      Scss

      $blue: #3bbfce;
      $margin: 16px;
      
      .content-navigation {
        border-color: $blue;
        color:
          darken($blue, 9%);
      }
      
      .border {
        padding: $margin / 2;
        margin: $margin / 2;
        border-color: $blue;
      

      }

      萨斯

      $blue: #3bbfce
      $margin: 16px
      
      .content-navigation
        border-color: $blue
        color: darken($blue, 9%)
      
      .border
        padding: $margin / 2
        margin: $margin / 2
        border-color: $blue
      

      Check more info on sass page

      【讨论】:

        猜你喜欢
        • 2017-02-12
        • 2011-08-04
        • 2017-04-20
        • 1970-01-01
        • 2014-09-24
        • 2016-11-15
        • 2011-10-14
        • 1970-01-01
        相关资源
        最近更新 更多