How to know viewbox parameters on save

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to know viewbox parameters on save

Ole Ersoy
Trying to figure out whether there is a deterministic way to save an optimized SVG such that we can match the viewbox parameters perfectly with the containing HTML elements width and height parameters.  For example if we have a div element like this:

<div style="width: 100px; height:100px"> <svg> ...</svg></div>

How do we save an SVG so that it gets a viewbox that will fit perfectly inside the div when we inline it as shown above?  Also asked the question on SO, but I'm hoping there is a more straight forward way to do this.

https://stackoverflow.com/questions/55958117/setting-the-viewbox-so-that-the-inline-svg-will-snap-to-the-size-of-the-contai/55958379?noredirect=1#comment98571159_55958379

TIA,

Ole



_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user