- πΊπΈUnited States lemming
Hi @earthday47 very sorry for letting this slip for so long. Meant to get back to this but needed to get a few other projects done first.
I've waited so long that BoxIcons has released a new version that has "viewbox" added: https://www.npmjs.com/package/boxicons
Though I still think the issue you've found here is still relevant. With SVG's the "viewbox" is important as it helps the SVG with scaling and ratio when the HTML dimensions are factored in. Distortion of the icon occurs when a "viewbox" is missing.
I'm thinking of we probably want to implement 2 additions for these changes:
- Use the width and height dimensions to create a "viewbox" (requires assumption on offset)
- Allow the iconset to provide default values. So you could add a "viewbox" value in the iconset definition, to be used when icons don't provide a value. Works for situations where this info is consistent for the iconset.
- Status changed to Fixed
about 1 month ago 2:58am 11 April 2025 - πΊπΈUnited States lemming
ViewBox or height & width are required in order for browsers to fit the image to the HTML elements or space.
The BoxIcons now provides this information and works correctly with the module. I'm going to call this fixed since it has been updated on the icon provider side.
Automatically closed - issue fixed for 2 weeks with no activity.