Tutorial

Comments in Sass

While this tutorial has content that we believe is of great benefit to our community, we have not yet tested or edited it to ensure you have an error-free learning experience. It's on our list, and we're working on it! You can help us out by using the "report an issue" button at the bottom of the tutorial.

In Sass you can define multiline comments the same way as in CSS:

/* Just some comment
about some style */

Unless you use the compressed output format, these multiline comments will be kept in the final CSS.

You can force Sass to keep multiline comments in the final output by using this syntax with the additional !:

/*! Just some comment
about some style */

You can also define single-line comments:

// Color my life
body {
  background-color: mistyrose;
}

Single-line comments won’t be kept in the final CSS, no matter which output style you use for compiling your Sass to CSS.

Creative Commons License