sass SCSS vs Sass Comments


Example

Comments in Sass vs. Scss are largely similar, except when multi-lines are concerned. SASS multi-lines are indentation-sensitive, while SCSS relies on comment terminators.


Single-Line Comment

style.scss

// Just this line will be commented!
h1 { color: red; }

style.sass

// Exactly the same as the SCSS Syntax!
h1
  color: red

Multi-Line Comment

style.scss

Initiator: /*

Terminator: */

/* This comment takes up
 * two lines.
 */
h1 {
   color: red;
}

This will style h1 elements with the color red.

style.sass

Now, SASS has two initiators, but no respective terminators. Multiline comments in SASS are sensitive to indentation levels.

Initiators: // and /*

// This is starts a comment,
   and will persist until you 
   return to the original indentaton level.
h1
  color: red

This will style h1 elements with the color red.

The same can be done with the /* Initiator:

/* This is starts a comment,
   and will persist until you 
   return to the original indentaton level.
h1
  color: red

So there you have it! The main differences between comments in SCSS and SASS!