Sometimes it can be useful to know what the distance is in pixels, from the top of an element to the top of the window. For example I recently had to integrate an SVG animation into a page, the main feature being the initial animated entrances of the various elements…
I came across a familiar issue last week when fixing some css bugs for a particular project, where SVG background images appeared to be squished in IE. The problem occurred wherever I had used an SVG as a css background image and scaled it with the background-size…