Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Podia.

Comments – Less

Demo

Summary

// Single line comment example

/* Multi-line
   comment
   example */

Details

Unlike CSS, Less supports two types of comments: single line and multi-line comments.

Single line comments are written using two forward slashes at the beginning of the comment. Multi-line comments start with a forward slash and an asterisk and end with an asterisk and a forward slash.

An important difference between the two types of comments is that single line comments will not appear in your compiled CSS while multi-line comments will.

Exercises

First, recreate the Less code in the embedded CodePen demo.

Then try changing the text in the comments.

Back to: Less Reference