What's the difference between SCSS and Sass?
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.
CSS variables are supported and can be utilized but not as well as pre-processor variables.
For 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.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.
Sass (Syntactically Awesome StyleSheets) have two syntaxes:
- a newer: SCSS (Sassy CSS)
- and an older, original: indent syntax, which is the original Sass and is also called Sass.
So they are both part of Sass preprocessor with two different possible syntaxes.
The most important difference between SCSS and original Sass:
Syntax is similar to CSS (so much that every regular valid CSS3 is also valid SCSS, but the relationship in the other direction obviously does not happen)
Assignment sign is
To create a mixin it uses the
To use mixin it precedes it with the
Files have the .scss extension.
- Syntax is similar to Ruby
- No braces
- No strict indentation
- No semi-colons
- Assignment sign is
- To create a mixin it uses the
- To use mixin it precedes it with the
- Files have the .sass extension.
Some prefer _Sass_, the original syntax - while others prefer _SCSS_. Either way, but it is worth noting that _ indented syntax has not been and will never be deprecated.
Conversions with sass-convert:
# Convert Sass to SCSS $ sass-convert style.sass style.scss # Convert SCSS to Sass $ sass-convert style.scss style.sass