Open In App

SASS | Comments

Comments in SASS is very similar to the comments in any other programming language. But the difference comes when we talk about the type of comments will be there in the compiled CSS file.

There are two types of comments in Sass:



  1. Silent Comments: Silent comments are single-line comments. When we compile Sass file these comments don’t reflect in compiled CSS file means these comments will not be there in CSS file.

    See the example below to get the idea:

    • SCSS file:
    • Compiled CSS file:
  2. Loud Comments: Loud comments are multiple line comments. These comments will be there in the compiled CSS file if the compiler is not in compressed mode.
    See the example below to get the idea:

    • SCSS file:
    • Compiled CSS file:

    If you want to include comments even in compressed mode then put /*! mark at the starting of comment instead of /*. These comments will always be there in the CSS file.

Article Tags :