Re: Aspect ratios in SVG: Numbers or integers?

On Fri, May 7, 2010 at 9:57 AM, Chris Lilley <chris@w3.org> 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
> http://dev.w3.org/SVG/profiles/1.1F2/master/coords.html#ViewBoxAttribute
>
> "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
> http://dev.w3.org/SVG/profiles/1.1F2/master/types.html#DataTypeNumber

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.

Then again, I may be splitting hairs.


~TJ

Received on Friday, 7 May 2010 18:22:41 UTC