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

Re: 'image-fit' vs preserveAspectRatio

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Wed, 22 Apr 2009 11:35:50 -0700
Message-ID: <49EF6386.10503@terrainformatica.com>
To: fantasai <fantasai.lists@inkedblade.net>
CC: Simon Pieters <simonp@opera.com>, "Grant, Melinda" <melinda.grant@hp.com>, "www-style@w3.org" <www-style@w3.org>, "www-svg@w3.org" <www-svg@w3.org>
fantasai wrote:
> Simon Pieters wrote:
>> 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?
>> ...
>>> Actually, the original name in the CSS draft was copied from SMIL
>>> and was 'fit', not 'preserveAspectRatio'.
>>
>> But the *keywords* were fill | hidden | meet | slice,
>> where meet and slice are the same as in SVG.
>
> I was replying to the minutes, specifically
>   "ED: image-fit ... according to simon, they called it pAR first,
>    not sure what's the reason for changing it"
>
> HP has gotten very positive feedback on the keyword name change,
> btw. I don't think we want to revert that.
>
<img>/<object> may have two images - one is defined by 
'background-image' CSS attribute.
and another defined by  its src DOM attribute.

The property that defines content or foreground image way of rendering 
should have a name
with distinction from the background image.

'foreground-image-fit' , 'content-image-fit' as examples of names with 
such distinction.

But I would suggest to add foreground-image as an entity to the CSS. So 
to add:

foreground-image:
foreground-position:
foreground-size:
foreground-repeat:
etc.

foreground-size already defines how image is getting stretched/shrunk.

In this case initial style sheet for HTML will simply have this record:

img, object
{
   foreground-image: attr("src");
   foreground-size: 100%;
}

--
Andrew Fedoniouk.

http://terrainformatica.com







 
Received on Wednesday, 22 April 2009 18:36:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:46:58 GMT