O'Reilly logo

Pragmatic Guide to Sass by Michael Lintorn Catlin, Hampton Catlin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5Commenting

Comments are snippets of text that are ignored by the browser. Sass gives us the option of two types of comments. One will only show up in the Sass document, and the other will be incorporated into the CSS that’s compiled.

The comment style that’s compiled into the CSS is the same one you’re probably used to—in fact, it’s exactly the same as the CSS comment style. Just place your comment between /* and */. These comments can be on multiple lines.

If we want to write a comment that will only appear in the Sass file, then we place the comment after //. This style only works for single-line comments, though.

What To Do...
  • Use two different styles of comments.
    basics/comments.scss
     
    /* Hey look at this multiline comment
     
    * that we want ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required