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

Re: [CSS21] Background-image: intrinsic ratio of SVG images

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 14 Nov 2011 14:20:50 -0800
Message-ID: <CAAWBYDCyfe6m_eeyybb5VcReb7Lbmp9hFJ1RJaG5msX5FDqWYg@mail.gmail.com>
To: www-style@gtalbot.org
Cc: Public W3C www-style mailing list <www-style@w3.org>
2011/11/14 "Gérard Talbot" <www-style@gtalbot.org>:
> If, say, an SVG image has
>
> <svg xmlns="http://www.w3.org/2000/svg">
>  <rect width="100" height="200" fill="green"/>
> </svg>
>
> than such SVG image has a 1 to 2 intrinsic ratio.
>
>
> I am wondering here how a SVG image could have an intrinsic ratio without
> intrinsic dimensions. How would that be possible for a SVG image? This is
> furthermore relevant since section 14.2.1 mentions such possibility (it's
> the paragraph I quoted above).

The viewBox attribute sets the ratio when width/height don't.  So the
following has a 1:2 ratio, but no intrinsic dimensions:

<svg viewBox="0 0 100 200">
 ...
</svg>

This is all explained, in a very difficult-to-understand manner, in
the SVG spec.

~TJ
Received on Monday, 14 November 2011 22:21:47 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:46 GMT