There is a known limitation of how certain browsers, web applications, and even image editing applications process SVG files. More information on this limitation can be found here.
This known issue can be solved by setting the width and height in the root SVG element. You can use any image editing application that supports editing of SVG files. The screenshot below shows an example.
You must make sure that the width and height are exactly equal to the file size. For example, if the file size is 48x48, the width and height in the SVG root element must be 48px and 48px respectively and rounding should not be done.
This is an example of the HTML code for a SVG file that has width and height in the root SVG element:
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
viewBox="0 0 48 48">
Please sign in to leave a comment.