67

Can I keep an inline comment like this in my .scss file

thead {
    display: table-header-group; // h5bp.com/t
}

I don't want this comment in my CSS output.

simhumileco
  • 31,877
  • 16
  • 137
  • 115
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
  • 2
    That comment won't appear in your CSS output according to the [documentation](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#comments). Unless something changed... – BoltClock Nov 13 '12 at 08:55

2 Answers2

109

There are two different types of comments to consider in SASS.

  1. Single line comments // will be removed by the .scss pre-processor, and won't appear in your .css file.
  2. Multiline comments */ are valid CSS, and will be preserved between the translation from .scss to your .css file.

It sounds like inline comments // are what you're looking for.

Audwin Oyong
  • 2,247
  • 3
  • 15
  • 32
KatieK
  • 13,586
  • 17
  • 76
  • 90
7

Yes, you can do it in SCSS.

Use inline comment: //.

These single-line comments are removed in the CSS output.

Akshay Vijay Jain
  • 13,461
  • 8
  • 60
  • 73
simhumileco
  • 31,877
  • 16
  • 137
  • 115