Re: 'image-fit' vs preserveAspectRatio

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:32 UTC