Re: Aspect ratios in SVG: Numbers or integers?

On May 7, 2010, at 11:21 AM, Tab Atkins Jr. wrote:

> On Fri, May 7, 2010 at 9:57 AM, Chris Lilley <> wrote:
>> On Friday, May 7, 2010, 6:22:03 PM, Tab wrote:
>> TAJ> In the CSS list we're discussing an aspect-ratio property which would
>> TAJ> hold a box to a particular width/height ratio.  Currently the proposed
>> TAJ> syntax is for the property to take a single <number> or two
>> TAJ> <integer>s.
>> TAJ> Someone on the list pointed out that he thought SVG allowed aspect
>> TAJ> ratios to be specified with two numbers (that is, something like "8 by
>> TAJ> 4.5" rather than "16 by 9").  He couldn't find a reference when I
>> TAJ> asked for it, though.
>> Look at the definition of the viewBox attribute
>> "The value of the ‘viewBox’ attribute is a list of four numbers <min-x>, <min-y>, <width>  and <height>, separated by whitespace and/or a comma"
>> where number is defined here
> Hmm.  I'm not sure that that's quite the same.  That appears to map to
> width and height (this is supported by your later statement), rather
> than an aspect ratio itself.  Setting a definite width and height
> certainly ends up specifying an aspect ratio, but is separate from
> *just* specifying an aspect ratio.

We have aspect-ratio in media queries:

It would be nice if there were some consistency.


Received on Friday, 7 May 2010 18:55:08 UTC