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

Re: [css3-background] ‘background-size’ and SVG images

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 19 Dec 2011 10:19:11 -0800
Message-ID: <4EEF801F.7000407@inkedblade.net>
To: "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
CC: www-style@w3.org
On 11/17/2009 07:16 AM, Dr. Olaf Hoffmann wrote:
> Hello,
> this comment is about
> http://www.w3.org/TR/2009/WD-css3-background-20091015/#the-background-size
> Due to another discussion I tried to understand the
> behaviour of background-size especially for SVG images as background images.
> I could not derive the intended behaviour if the SVG image contains
> information within the preserveAspectRatio attribute such as 'none' or
> for example 'xMidYMid slice' (can be pretty useful for complex patterns of
> finite size, for example for a Penrose pattern, obviously the intention of
> the author is, to cut off parts not fitting to the aspect ratio of the
> viewport instead of meeting the viewport with areas without a pattern
> specified), if such an image is used in combination with background-size.
> I can image, how it works without background-size, but with seems to
> provide even more possibilities (and complications as well).
> Does the information from preserveAspectRatio take precedence, if
> available?

CSS sizes the box by using the intrinsic dimensions / ratio only.
Once it sizes the box, the SVG paints itself into that box. How
it paints into that box is defined by SVG. See

Received on Monday, 19 December 2011 18:19:41 UTC

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