W3C home > Mailing lists > Public > www-style@w3.org > August 2011

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

From: Brian Manthos <brianman@microsoft.com>
Date: Mon, 8 Aug 2011 20:27:05 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: "L. David Baron" <dbaron@dbaron.org>, "Boris Zbarsky (bzbarsky@MIT.EDU)" <bzbarsky@mit.edu>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D17115C7F@TK5EX14MBXC264.redmond.corp.microsoft.com>
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.)


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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:03 UTC