Sass comment formats

There are two different ways to add comments into Sass files.

Standard CSS comments

As any standard CSS file is also a valid Sas(.scss) file, it stands to reason we can comment as we would in standard CSS:

/* Here is a normal CSS comment */

Remember, using this format alongside the compressed output option will mean that the comment is removed from the resultant CSS. However, if not using the compressed option, the comment will be retained in the CSS.

Sass single line comments

Sass also allows the use of a double forward slash to define the beginning of a single line comment. This is the same manner in which JavaScript files can be commented; anything written after the double forward slash on the same line becomes a comment. Here's ...

Get Sass and Compass for Designers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.