I am working on magento2 theming part. Here we have some predefined and my custom LESS file. Whenever we compile LESS file, it generates two css file -- styles-l.css, styles-m.css . But we do not know from which LESS file, my css is going to styles-l.css and styles-m.css. Is there any way to find out this issue? I want to see from which file (line number too) my code is coming ? Is there any way to solve these issues ? Any help is really appreciated. Currently i am doing deploy static data. It compiles all LESS files. I want to compile single LESS file.

2 Answers 2


You have to install the Grunt for your server, check below url to setup the Grunt .


Inside the Gruntfile.js you can add the code like below example

For single File compile us the following code

files: {
          "css/main.css": "less/main.less" // destination file and source file

Compile only 1 file makes no sense.

But you can use SourceMap for your compiled CSS to see in which line & file is your sourcecode.

Enable SourceMap-Support in Chrome Browser:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.