2

I've worked on a few ruby apps with .scss scripts for the CSS of the website. But I came across a new ruby app which uses .sass instead. Are there any advantages or things to look out for with this change?

ecki
  • 780
  • 1
  • 7
  • 20

3 Answers3

3

They are functionally equivalent but have a different syntax. From the SASS homepage:

[...] there is no functional difference between them. Use the syntax you prefer.

Patrick Oscity
  • 53,604
  • 17
  • 144
  • 168
1

Sass is a cleaner way to make 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;

}

Sass

$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

Luis
  • 5,786
  • 8
  • 43
  • 62
0

SASS and SCSS are the same thing, there are however two different syntaxes used.

Lucero
  • 59,176
  • 9
  • 122
  • 152