Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove LESS // comments on compile

Tags:

css

less

Is it possible to configure LESS to remove "// comments" when it compiles via JS?

I want to remove them from the outputted less file.

like image 808
bigdaveygeorge Avatar asked Jan 03 '14 14:01

bigdaveygeorge


1 Answers

Less' single-line comments // are supposed to be silent, as per documentation states:

Single-line comments are also valid in LESS, but they are ‘silent’, they don’t show up in the compiled CSS output:

// Hi, I'm a silent comment, I won't show up in your CSS .class { color: white } 

See at LESS' website: http://lesscss.org/#-comments

-x flag works on command line to output minified CSS (which will strip CSS comments), but in any way, double slash shouldn't appear on css. See http://lesscss.org/#usage at 'Command-line usage' topic.

like image 199
RaphaelDDL Avatar answered Sep 27 '22 19:09

RaphaelDDL