viewBox
The viewBox attribute defines the position and dimension, in user space, of an SVG viewport.
The value of the
viewBoxattribute is a list of four numbers separated by whitespace and/or a comma:min-x,min-y,width, andheight.min-xandmin-yrepresent the smallest X and Y coordinates that theviewBoxmay have (the origin coordinates of theviewBox) and thewidthandheightspecify theviewBoxsize. The resultingviewBoxis a rectangle in user space mapped to the bounds of the viewport of an SVG element (not the browser viewport). When an SVG contains aviewBoxattribute (often in combination with apreserveAspectRatioattribute), a transform stretches or resizes the SVG viewport to fit a particular container element.
Printed 2026-09-05.
(echo:: @ ᯤ)