W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: [css-images] Overconstrained image sizing and preserving aspect ratio: the object-sizing property

From: Edward O'Connor <eoconnor@apple.com>
Date: Fri, 07 Feb 2014 14:32:10 -0800
To: www-style@w3.org
Message-id: <m2mwi28sgl.fsf@eoconnor.apple.com>
Hi,

I wrote:

>> One (of the only things) that I like about naming it `object-<foo>'
>> is that it parallels the naming of object-fit and object-position, so
>> it's easier for authors to understand that it only applies to
>> replaced elements. How about `object-aspect{,-ratio}'? Or do you want
>> an `aspect-ratio' property that applies to non-replaced elements too?

Tab replied:

> Why should this only apply to replaced elements? Sorry if it wasn't
> clear, but I definitely intend this to apply to all elements; people
> ask for aspect ratios on normal elements fairly regularly, and today
> do weird hacks (like percentage padding-bottom) to achieve it.
>
> I mean, we can certainly start with keywords that only do something
> useful for replaced elements. But I want to end up with aspect ratio
> just being a thing that all elements can do.

Fair enough. `aspect-ratio' it is then! Dean's been prototyping this
property and IIRC his implementation only applies to replaced
elements.[1] But a priori I don't see why we couldn't make it work for
other elements later. The fallback story is really nice too.

> I'm fine with "prefer-intrinsic", or something similar, for the one
> that just upgrades the power of an intrinsic aspect ratio.

Dean keeps typing "preserve-intrinsic," which might be a hint that
"preserve" is a better term than "prefer." *shrug*

> Maybe use "normal" for the default value - we've done that before, I
> think it's more correctish than "none", and I don't want to use "auto"
> for this.

Yeah, "normal" or "default" or something like that. As an author I would
expect "auto" to do something DWIMmy that's not what legacy engines do.


Ted

1. https://webkit.org/b/128262
Received on Friday, 7 February 2014 22:32:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC