RE: [css3-background] 'background-size: auto auto' and images with intrinsic size in one dimension

I was referring to background-image, not <image>...

-----Original Message-----
From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
Sent: Monday, August 08, 2011 1:14 PM
To: Brian Manthos
Cc: L. David Baron; Boris Zbarsky (bzbarsky@MIT.EDU); www-style@w3.org
Subject: Re: [css3-background] 'background-size: auto auto' and images with intrinsic size in one dimension

On Mon, Aug 8, 2011 at 1:03 PM, Brian Manthos <brianman@microsoft.com> wrote:
> I'm interpreting the language "they indicate a portion of the viewport that is actually covered by image data" to include the meaning "resolve percentage widths and heights against the viewport to establish the size of 'image data' (when used for purposes such as background-image)".
>
> For right or wrong, I believe that's roughly how it was interpreted or IE9's implementation.

You are correct, that *is* what that line means.  What you're misunderstanding is that you first have to size the viewport in order to resolve percentages against the viewport.  Sizing the viewport is what CSS does when it asks for the image's intrinsic dimensions.

(In other words, you're conflating the notion of sizing the root <svg> element and sizing the image/viewport.  In directly-embedded SVG, the two are the same.  In embedded-by-reference SVG, like SVG-in-<img>, they're not.)

~TJ

Received on Monday, 8 August 2011 20:28:04 UTC