SVG:Specification Issues:SVG Sizing
XXX This is mixed up since I wrote it bit by bit before it became apparent that the spec and WG members contradict each other. Ignore this page for now until I sort it out.
The text at http://www.w3.org/TR/SVGMobile12/coords.html#IntrinsicSizing could be much clearer on what constitutes an intrinsic width and intrinsic height (it's reasonably clear on intrinsic ratio). I'd suggest the following text:
SVG needs to specify how to calculate some intrinsic sizing properties (intrinsic width, intrinsic height and intrinsic aspect ratio) to enable inclusion within other languages (for example, when including SVG from an object element in XHTML styled with CSS).
The intrinsic width and height of SVG content is specified by the 'width' and 'height' attributes, but only if the attribute value is specified with a unit identifier (in, mm, cm, pt, pc, px, em, ex) or in user unit. If the 'width' (or 'height') attribute is not specified, or if the attribute is specified as a percentage value, then the SVG content does not have an intrinsic width (or height).
The intrinsic aspect ratio of SVG content is calculated:
- by dividing the SVG content's intrinsic width by its intrinsic height if it has both an intrinsic width and an intrinsic height; else
- if a 'viewBox' is specified for the current SVG document fragment, by dividing the viewBox's width by the viewBox's height; else
- the SVG content does not have an intrinsic aspect ratio
XXX it is really unclear from the spec text and the text above that percentage width/height attributes do specify percentage intrinsic width/height, but that it's just intrinsic aspect ratio that they don't specify. See craig's comment on http://lists.w3.org/Archives/Member/w3c-svg-wg/2005JanMar/1296.html
here should not mention preserveAspectRatio