Why I can see Less instead of CSS in a browser [closed]

So I imagine you know that LESS is a CSS compiler and what is surprising you is that the LESS files are showing up in the dev tools and not some huge bundled CSS file?

This magic, is to do with something awesome called source maps. Source maps allow the browser to point to specific LESS or SASS files and show you exactly where the code is coming from. Think about trying to debug a design and the browser say the style is coming from line 2754 in style.css, well that’s no good to you because your styles are only compiling into style.css and you need to know where to make the change in your LESS file.

Thankfully that’s exactly where source maps come into play. So they aren’t really loading in the browser, the browser just knows what LESS file that piece of code in the CSS is coming from.

Browse More Popular Posts

Leave a Comment