You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to this guide on the root svg element the width/height or the viewbox needs to be set, so the svg can properly scaled via CSS, when either height or width is set to auto.
The generated sprite from svg-sprite I embed like this:
I think it would be a great feature for svg-sprite to export a JSON file with some meta information about the sprites like width, height and viewBox, which then can dynamically added.
The text was updated successfully, but these errors were encountered:
@openscript hello!
All the data (except viewbox) can be found here in the shape field. You can easily calculate the viewBox like 0 0 ${shape.width.inner} ${shape.height.inner}
According to this guide on the root svg element the width/height or the viewbox needs to be set, so the svg can properly scaled via CSS, when either
height
orwidth
is set toauto
.The generated sprite from
svg-sprite
I embed like this:I think it would be a great feature for
svg-sprite
to export a JSON file with some meta information about the sprites likewidth
,height
andviewBox
, which then can dynamically added.The text was updated successfully, but these errors were encountered: