W3C home > Mailing lists > Public > www-style@w3.org > May 2010

Re: suggestion: fixed-aspect-ratio CSS rule for block elements

From: Julien Cayzac <julien.cayzac@gmail.com>
Date: Sat, 8 May 2010 10:31:00 +0900
Message-ID: <AANLkTil3h5HktTZBXcdaukjt1Wgj-AjI47VGfiBdXOQb@mail.gmail.com>
To: www-style@w3.org
On Thu, May 6, 2010 at 11:42 PM, James Elmore <James.Elmore@cox.net> wrote:

> Another point -- the pair of integers could be specified as "width, height"
> or even "width height". And what if an author uses a non integer (ddd.dd)?
> is that an error, or is the second number ignored, or is the ratio still
> used. SVG users would expect the numbers to be used, even if they were not
> integers. I hope CSS follows that path.
>

I agree some people could want aspect-ratio: 1.6 / 0.9 to work. I would go
further and say negative numbers could be allowed as long as both numbers
are negative (so the outcome is always positive), i.e. -16 / -9 works too.

Now, the only case I see where this would be useful is when the property is
generated from inside a script, so the developer doesn't have to perform
range reduction on the values. Convenient, but is it really needed?

Julien.
-- 
Julien Cayzac
http://julien.cayzac.name/
skype://jcayzac?chat
Received on Saturday, 8 May 2010 01:31:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:27 GMT