Re: 'image-fit' vs preserveAspectRatio

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

Gerrie Shults suggests object-scale or object-size. I'll throw in
object-fit to that mix.


Received on Friday, 24 April 2009 02:15:57 UTC