Closed patrislav1 closed 6 months ago
Played around with viewBox and read the spec a bit but not sure i got much wiser :) reading https://www.w3.org/TR/SVG11/coords.html#Introduction it sounds like it might be possible to use something else then px but i can't get it to work, also says "The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages." 😬
Anyways, change looks good and we can improve on non-pixels if possible later
Played around with viewBox and read the spec a bit but not sure i got much wiser :) reading https://www.w3.org/TR/SVG11/coords.html#Introduction it sounds like it might be possible to use something else then px but i can't get it to work, also says "The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages." 😬
I'm not entirely sure about the relation between viewport and viewbox but IIUC then the latter maps the former to some kind of display region which can only be given in pixels. (The spec looks kind of vague in this regard, and how it's implemented by renderers is another question :exploding_head: )
fixes SVG output for tools that rely on viewBox, such as asciidoctor
fixes #49
From SVG documentation it appears that
viewBox
only supports pixel units, so I just add it when we use pixels