I use viewBox to simulate percentage values for the path like that:
<svg width="500" height="500" viewBox="0 0 100 100">
which means that one unit has 5px. That works as expected except that the stroke is always 5px width. How can I set width of the stroke to be always 1px ? I've already tried stroke-width:1px
which didn't work.
Use vector-effect.
<line ... stroke-width="1px" vector-effect="non-scaling-stroke" />
http://www.w3.org/TR/SVGTiny12/painting.html#NonScalingStroke
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With