VarunDevBlog

Commenting in SASS

SASS supports css comments which are block comments.

/* This is a CSS comment, but works also in SASS*/

But SASS has a sass-specific style of comments, which are single line comments

// This only works in SASS, not in CSS

Compilation differences

There is a difference in both of these types of comments in SASS i.e., Compilation

  • The CSS comments appear in the .css files
  • The SASS comments don’t appear in the .css files
body{
    // This a SASS Comment
    height: 100%;
}
nav{
    /* This a CSS Comment*/
    ul{
        list-style:none;
        display: flex;
    }
}
body{
    height: 100%;
}
/* This a CSS Comment*/
nav ul{
    list-style:none;
    display: flex;
}