Computer Magic Logo
Comments

Sunday, June 7, 2015

Published by Aristotelis Pitaridis

In Less there are two kinds of comments. The first is the multi-line comment which is going to be copied to the CSS generated by the compiler. The second is the Single-line comment which does not appear in the final CSS file. Below we can see an example of these two comments:

/* This 
    is
    a
    multiline
    comment */

// This is a single line comment

After compiling the Less file, the final CSS file will have the following result:

/* This 
    is
    a
    multiline
    comment */

In Minified file generated by the compiler, both types of comments are going to be removed by the compiler in order to have the smallest possible file size.