3

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

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

http://ericnish.io/blog/compile-less-files-with-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
        }
1

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:

http://dannycroft.co.uk/enabling-source-maps-in-chrome/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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