W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2010

Re: Aspect ratios in SVG: Numbers or integers?

From: Simon Fraser <smfr@me.com>
Date: Fri, 07 May 2010 11:54:15 -0700
Cc: Chris Lilley <chris@w3.org>, public-fx@w3.org
Message-id: <03FDE1E2-4D17-4D77-BB4F-7CF3B0387C74@me.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On May 7, 2010, at 11:21 AM, Tab Atkins Jr. wrote:

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

We have aspect-ratio in media queries:
<http://dev.w3.org/csswg/css3-mediaqueries/#aspect-ratio>

It would be nice if there were some consistency.

Simon
Received on Friday, 7 May 2010 18:55:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 7 May 2010 18:55:08 GMT