I made a PR (#136) to fix issue #123 which essentially consisted of removing the height/width from the inlined SVG element. According to this CSS Tricks article on SVGs the width/height attributes are not useful for scaling inline SVGs, and instead we should set the aspect ratio with viewBox.
The 2 solutions that I can think of would be:
- Manually remove
width & height attributes from the SVG files.
- Use a gulp task to remove
width & height attributes on build.
The gulp inline package that we're using supports SVG transformations via options. I would guess, this is something that would help, but I'm not sure.
I see this being similar to #104 so solving one may solve the other 🤞
I made a PR (#136) to fix issue #123 which essentially consisted of removing the height/width from the inlined SVG element. According to this CSS Tricks article on SVGs the width/height attributes are not useful for scaling inline SVGs, and instead we should set the aspect ratio with
viewBox.The 2 solutions that I can think of would be:
width&heightattributes from the SVG files.width&heightattributes on build.The gulp inline package that we're using supports SVG transformations via options. I would guess, this is something that would help, but I'm not sure.
I see this being similar to #104 so solving one may solve the other 🤞