Skip to content

Help us create more tutorials! Make a donation using the Donate button or become a member using the button below to hide this banner and track your progress.

Comments – Sass

Demo

Summary

// Single line comment example

/* Multi-line
   comment
   example */

Details

Unlike CSS, Sass supports two types of comments: single line and multi-line comments.

Single line comments are written using two forward slashes at the beginning of the comment. Multi-line comments start with a forward slash and an asterisk and end with an asterisk and a forward slash.

An important difference between the two types of comments is that single line comments will not appear in your compiled CSS while multi-line comments will.

Exercises

First, recreate the Sass code in the embedded CodePen demo.

Then try changing the text in the comments.

References

Comments | Sass Documentation

Back to: Sass Course