W3C home > Mailing lists > Public > www-style@w3.org > April 2009

Re: 'image-fit' vs preserveAspectRatio

From: Philip Jägenstedt <philipj@opera.com>
Date: Wed, 22 Apr 2009 09:47:42 +0200
To: fantasai <fantasai.lists@inkedblade.net>, "Simon Pieters" <simonp@opera.com>
Cc: "Grant, Melinda" <melinda.grant@hp.com>, "www-style@w3.org" <www-style@w3.org>, "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <op.usr2lsp4atwj1d@sisko.linkoping.osa>
On Tue, 21 Apr 2009 20:51:29 +0200, fantasai  
<fantasai.lists@inkedblade.net> wrote:

> Erik Dahlström wrote:
>>>> Previously, the CSS spec had the same keywords as SVG. What's
>>>> the reason for the change?
>>> The keywords were initially taken from SMIL 1.0, but it was felt that  
>>> the functionality was different enough that we should use different  
>>> names to prevent confusion.  Also, the CSS group felt that the  
>>> previous keywords weren't as descriptive as they could be.
>>  The SVG WG seemed to be ok with a new property, and could adopt it for  
>> use in SVG too, but 'image-fit' wasn't seen as a general enough name.
>>  See http://www.w3.org/2009/03/16-svg-minutes.html#item06
> Actually, the original name in the CSS draft was copied from SMIL
> and was 'fit', not 'preserveAspectRatio'. The CSSWG felt 'fit'
> was too general--since in CSS it only applies to replaced elements,
> and not to any other boxes--and decided to rename it 'image-fit'.
> I can't speak for the WG, but I think we'd be open to renaming it
> to align better with SVG. However, I don't think 'aspect-ratio'
> is a good name because this property doesn't give an aspect ratio.
> I'm not coming up with any good alternatives here, just
>    fit-scaling: fill | cover | contain
>    fit-position: <background-position>
> If you've got any other ideas throw them in...
> ~fantasai

How about content-fit and content-position? Perhaps this clashes too much  
with the content property, to which it isn't really related. Otherwise  
background-position/content-position makes intuitive sense. If this were  
used I guess people would soon expect background-fit to work too, not sure  
if that is at all possible or not though.

Philip Jägenstedt
Opera Software
Received on Wednesday, 22 April 2009 08:06:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:35 UTC