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

Le Lun 14 novembre 2011 13:55, Tab Atkins Jr. a écrit :
> 2011/11/14 "Gérard Talbot" <>:
>> Hello all,
>> Section 14.2.1 background-image
>> states
>> "
>> If the image has no intrinsic dimensions and has an intrinsic ratio the
>> dimensions must be assumed to be the largest dimensions at that ratio
>> such
>> that neither dimension exceeds the dimensions of the rectangle that
>> establishes the coordinate system for the 'background-position'
>> property.
>> "
>> Now, let's assume that a SVG image (say, filenamed as
>> some-svg-image.svg)
>> is used as background-image and its code is:
>> some-svg-image.svg:
>> <svg xmlns="">
>>  <rect width="100%" height="100%" fill="green"/>
>> </svg>
>> Does such SVG image has an intrinsic ratio?
>> I believe it does have intrinsic ratio: an 1 to 1 ratio. Am I wrong?
> Yup, you're wrong.  ^_^  Percentages do not count as intrinsic dimensions.

Thank you, Tab. That answers my question (... although I admit I am still
surprised by your answer here... )

If, say, an SVG image has

<svg xmlns="">
 <rect width="100" height="200" fill="green"/>

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).

regards, Gérard
CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite

Received on Monday, 14 November 2011 22:15:25 UTC