Jitendra Vyas
Jitendra Vyas

Reputation: 152807

Does SCSS support inline comments?

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.

Upvotes: 68

Views: 51303

Answers (2)

KatieK
KatieK

Reputation: 13853

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.

Upvotes: 110

simhumileco
simhumileco

Reputation: 34633

Yes, you can do it in SCSS.

Use inline comment: //.

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

Upvotes: 7

Related Questions