loominade
loominade

Reputation: 1058

Multiline comments in sass after a declaration

The SASS documentation states:

Sass supports standard multiline CSS comments with /* */, as well as single-line comments with //. The multiline comments are preserved in the CSS output where possible, while the single-line comments are removed.

That seems not to be always true.

/* what an ugly declaration */

body
  color: green

will be compiled to:

/* what an ugly declaration */

body {
  color: green; }

but if I put the comment after a property:

body
  color: green /* what an ugly color */

it will be removed:

body {
  color: green; }

Can I change this behaviour?

Upvotes: 0

Views: 641

Answers (1)

Sujan Mhrzn
Sujan Mhrzn

Reputation: 157

Try adding /*! your comment code */ in your comment.

Example:

body{

color: green; /*! What an Ugly color */

}

This should help you.

Upvotes: 3

Related Questions