One of many exciting new features in Sass 3.3 that each and every designer should just just simply take benefit of is source maps.
As CSS pre-processors, minifiers, and JavaScript transpilers have grown to be conventional its increasingly hard to debug the rule operating into the web web browser as a result of distinctions with all the original supply rule.
For instance, by using CoffeeScript (which compiles to JavaScript) you may not see CoffeeScript while debugging within the web browser. Rather, you will see put together JavaScript. The problem that is same for Sass which compiles right down to CSS.
Supply maps look for to bridge the space between higher-level languages like CoffeeScript and Sass plus the lower-level languages they compile down to (JavaScript and CSS). Supply maps enable you to begin to see the source that is originalthe CoffeeScript or Sass) rather than the put together JavaScript or CSS while debugging.
This means that when you inspect an element with developer tools, rather than seeing the CSS styles associated with that element, you can see the code we really care about: the pre-compiled Sass in practice, for Sass users.
Generating source maps for Sass
To have usage of this particular aspect within the web browser, you’ll want to produce a supply map apply for each supply file.
For Sass, this can be as simple as including a banner to Sass’s demand line device:
In the event that you try looking in your production folder after operating that demand, you will realize that a remark happens to be put into the finish associated with generated CSS file:
Recent Comments