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:
      Sass
    • Compiled CSS file:
      Sass Example

    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.



My Personal Notes arrow_drop_up

I am doing BTech at Dhirubhai Ambani Institute of Information and Communication Technology

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.