qr_code
qr_code copied to clipboard
Adding a `viewbox` attribute to the generated svg.
Hi, I've bumped into a problem integrating the svg into a view: resizing the item made it cut its content instead of scaling it.
To fix it, I added a viewbox, like this:
<svg width="410" height="410" ... viewbox="0 0 410 410">...</svg>
This way the svg resizes with its content scaling.
I don't know why this hasn't already been suggested, but it helps a lot when styling.
I might suggest a PR if you're interested :)
And here you go with the pull request 🙂