Russian Bride Nude

Exciting new features — making use of supply maps with Sass 3.3

Exciting new features — making use of supply maps with Sass 3.3

One of many exciting brand brand brand new features in Sass 3.3 that each designer should simply take benefit of is source maps.

As CSS pre-processors, minifiers, and JavaScript transpilers are becoming conventional it really is increasingly hard to debug the rule operating in the web browser due to distinctions using the source code that is original.

For instance, you won’t see CoffeeScript while debugging in the browser if you use CoffeeScript (which compiles to JavaScript. Alternatively, you will see compiled JavaScript. The exact same issue exists for Sass which compiles right down to CSS.

Supply maps look for to bridge the space between higher-level languages like CoffeeScript and Sass additionally the lower-level languages they compile down to (JavaScript and CSS). Supply maps permit you to start to see the initial supply (the CoffeeScript or Sass) rather than the put together JavaScript or CSS while debugging.

In practice, for Sass users, which means that whenever you examine a feature with designer tools, in place of seeing the CSS designs connected with that element, you can view the rule we actually worry about: the pre-compiled Sass.

Generating source maps for Sass

Getting usage of this particular feature into the web web browser, you’ll want to produce a supply map apply for each supply file.

For Sass, this might be as simple as incorporating a banner to Sass’s demand line device:

In brightbrides.net best russian brides the event that you try looking in your production folder after operating that demand, you will observe that a remark happens to be included with the finish associated with generated CSS file:

This points to a file that is additional is made during compilation: screen.css.map , which — whilst the title suggests — is exactly what maps most of the compiled CSS back again to the foundation Sass declarations. In the event that you’re thinking about the details with this file and exactly how maps that are source work, discover Ryan Seddon’s Introduction to JavaScript Source Maps over at HTML5Rocks. (Although the article suggests that it really is just about JavaScript, all supply maps work exactly the same.)

Читать далее

Рубрики