Does SCSS support inline comments?

CssSass

Css Problem Overview


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.

Css Solutions


Solution 1 - Css

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

  1. Single line comments // will be removed by the .scss pre-procesor, 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.

Solution 2 - Css

Yes, you can do it in SCSS.

Use inline comment: //.

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJitendra VyasView Question on Stackoverflow
Solution 1 - CssKatieKView Answer on Stackoverflow
Solution 2 - CsssimhumilecoView Answer on Stackoverflow