Hello,
would you please consider switching from width and height attributes of <svg> element to viewBox attribute (optionally / default) so the resulting <svg> is responsive?
So, instead of:
<svg width="300" height="300">...</svg>
it would be like this:
<svg viewBox="0 0 300 300" preserveAspectRatio="xMidYMid meet">...</svg>
This would change the SVG canvas to be fully responsive and handled by browser. You will have your canvas set to specific "pixels" but it can be rendered at any width and height (with the same ratio) and allow browser to scale it for full responsive behavior.
Hello, would you please consider switching from width and height attributes of
<svg>
element to viewBox attribute (optionally / default) so the resulting<svg>
is responsive?So, instead of:
<svg width="300" height="300">...</svg>
it would be like this:
<svg viewBox="0 0 300 300" preserveAspectRatio="xMidYMid meet">...</svg>
This would change the SVG canvas to be fully responsive and handled by browser. You will have your canvas set to specific "pixels" but it can be rendered at any width and height (with the same ratio) and allow browser to scale it for full responsive behavior.
more info: https://css-tricks.com/scale-svg/