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

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 5 May 2010 21:35:51 -0700
Cc: www-style@w3.org
Message-Id: <162B210A-A9EE-4B8E-B6DC-75B3F5DB9379@gmail.com>
To: julien.cayzac@gmail.com

On May 5, 2010, at 5:17 PM, Julien Cayzac wrote:

>> 3) We add aspect-ratio, but have it only interact with 'auto' values
>> for width/height.  So, in the previous example, the aspect-ratio would
>> have no effect, since both width and height are already specified.  If
>> you set height:auto instead, though, then aspect-ratio will be
>> consulted to resolve it.  Or you could set height and leave width as
>> auto, so aspect-ratio would also have an effect.  Finally, if both
>> were auto (the default), then whichever is resolved first (typically
>> width) would be resolved normally, then aspect-ratio would be used to
>> resolve the other dimension (typically height).
>> I like #3 the best.
> 
> Same here. The way dimensions get resolved is more understandable this way

I think that is the best choice, to avoid confusion over which height/width to use. Also, I would go further and say that it only interacts with 'auto' values when there is no conflicting  min/max-width/height in that dimension (min/max takes precedence).

Received on Thursday, 6 May 2010 04:36:27 GMT

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