Magento – Magento 2 and Client Side Less Compilation

less-cssmagento-2.1magento2theme

I have stock Magento 2 installed and running with a custom theme that uses the 'blank' theme as its parent.

My custom theme is active on my store and it works, I can create my own styles and template files and all is good.

I am at the point where I am trying to style my theme and I want to make use of Live CSS/LESS Updates.

I am using Chrome as my development browser.

Now, when I set Magento 2 to Client Side LESS Compilation, my page loads correctly as expected, however, when I inspect an element in the devtools of the browser, instead of seeing which file has the active styles, instead I am seeing style tags.

enter image description here

This is my first time using LESS, how do I go about fixing this so that the file names appear when inspecting elements.

Best Answer

You should use Server side less compilation with Grunt.

STORES > Configuration > ADVANCED > Developer > Front-end development workflow > Server side less compilation

enter image description here

Remember to delete the static content and deploy again.