Re: [svgwg] Spec synthesis of viewBox/preserveAspectRatio for viewBox-less SVGs in image contexts

@dholbert 

There are two different cases:

- if the SVG root element in the embedded file has _none_ of 
`viewBox`, `width`, or `height`, then it has no defined dimensions 
from which to scale it. It would be rendered at the scale determined 
by the embedding element's coordinate system, and any overflow would 
be cropped.

-  if the SVG root element in the embedded file _doesn't_ have a 
`viewBox`, but it _does_ have clearly defined dimensions from `width` 
and `height`, then I would expect that width and height to be used to 
scale the image, just as the intrinsic width and height on a raster 
image would be scaled to fit.  However, this isn't clearly spec'd.

Either way, I would expect the same behavior for the same SVG file 
embedded with an SVG `<image>` or with an HTML `<img>`, with the 
exception that the SVG `<image>` applies a `preserveAspectRatio` 
value.  But again, we should spec this more explicitly somewhere.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at 
https://github.com/w3c/svgwg/issues/249#issuecomment-253092701 using 
your GitHub account

Received on Wednesday, 12 October 2016 01:19:26 UTC