Debugging Magento 2 CSS Files in Chrome Developer Tools

csslessmagento2theme

I setup a custom theme based on Magento Blank theme. If I inspect the styles I see different css styles? I thought it should only show styles-l.css and style-m.css? Whats wrong here?

enter image description here

Best Answer

Google Chrome shows the source of the CSS and M2 uses LESS which is then coimpiled into CSS.

Chrome gets the LESS file source from the Source Maps provided in your theme files.

To update or edit styles of a Magento 2 theme you should do so by updating the less files and compiling either using Grunt or M2's server side LESS compilation.

You can find full details of CSS preprocessing in M2 in there documentation

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css-preprocess.html

Related Topic