Ask HN: SVG Resolution

  • When exporting to a raster, the product of the inch dimensions and the DPI specifies the raster's pixel dimensions.

    It is this pixel dimensions that matters on the web as it sets the size.

    Some prefer to leave this out of the SVG and size them with CSS where there are richer options for dynamic sizing.

    I recommend setting a good default size and then overriding it using CSS.

    I have seen too many SVG that due to the lack of sizing constraints that would have been imposed by their container end up as wide as the screen and equally tall.