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

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 UTC