W3C home > Mailing lists > Public > www-style@w3.org > October 2008

Re: [css3-mediaqueries] feedback on device-aspect-ratio, aspect-ratio and orientation

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 31 Oct 2008 08:15:34 -0500
Message-ID: <dd0fbad0810310615y762f33c8m43313eb4aaa13944@mail.gmail.com>
To: www-style@w3.org
On Fri, Oct 31, 2008 at 2:15 AM, Cameron McCormack <cam@mcc.id.au> wrote:

>
> Dean Jackson:
> > We are interested in these features, but request changes.
> >
> > aspect-ratio and device-aspect-ratio
> > ------------
> >
> > We think these should take a number (float) rather than a ratio (defined
> > as a string). While ratio gives the same result it doesn't seem worth
> > introducing a new type just for these queries.
>
> Wouldn't that make it difficult (or impossible, since css3-values says
> numbers are reals rather than particular precision floats) to match some
> aspect ratios like 4:3?  Wouldn't the author then be forced to write
> something like:
>
>  (min-aspect-ratio: 1.333) and (max-aspect-ratio: 1.334)


Almost this exact discussion came up on the WHATWG list about <video> aspect
ratios.  ^_^  Ian has so far kept the aspect ratio a float.  His argument is
that the precision with which we store floats is *vastly* greater than the
differences between aspect ratios in use today or in the relatively near
future, and so the difference between a given ratio and the
closest-approximation float is irrelevant.  (And by the time they might get
close, we can just upgrade it to a 64-bit float or something.)

~TJ
Received on Friday, 31 October 2008 13:16:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:15 GMT