Re: 'image-fit' vs preserveAspectRatio

2009/4/22 Philip Jägenstedt <philipj@opera.com>:
> 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.

content-fit is how the content (the content property, being it
"contents" or "url" or an arbitrary string) fits inside the box (or
set of boxes) generated by the element. So it is related to content,
and I support "content-fit".

I don't really support content-position: if you want to change the
shape of content area, you normally change padding, don't you?

> 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.

We have multiple properties instead of background-fit
(background-repeat, background-clip, background-size...).

> --
> Philip Jägenstedt
> Opera Software
>
>

Giovanni

Received on Wednesday, 22 April 2009 13:34:17 UTC