The W3C specifications say comments should be defined using /* ... */
. The use of //
is not supported on all browsers and
can lead to unexpected results.
Noncompliant code example
// some comment
a { color: pink; }
Compliant solution
/* some comment */
a { color: pink; }
Exceptions
This rule ignores single line comments in less
and scss
files.