Re: [css3-box] providing an aspect-ratio for a box (Re: suggestion: fixed-aspect-ratio CSS rule for block elements)

--------------------------------------------------
From: "Tab Atkins Jr." <jackalmage@gmail.com>
Sent: Monday, September 20, 2010 1:45 PM
To: <www-style@w3.org>
Subject: Re: [css3-box] providing an aspect-ratio for a box (Re: suggestion: 
fixed-aspect-ratio CSS rule for block elements)

> On Mon, May 10, 2010 at 9:51 PM, Julien Cayzac <julien.cayzac@gmail.com> 
> wrote:
>> On Tue, May 11, 2010 at 11:56 AM, Tab Atkins Jr. <jackalmage@gmail.com> 
>> wrote:
>>> There is in fact already a module for
>>> that purpose, the Basic Box Model draft at
>>> http://www.w3.org/TR/css3-box/.
>>>
>>> This sort of property/value may be appropriate there, or in a related 
>>> draft.
>>
>> Thanks, I just changed the subject of the discussion accordingly, so
>> that it catches Bert's eye if he skipped it :-)
>
> We've got some Chrome people interested in implementing aspect-ratio,
> so we can use it on various stuff at Google.
>
> Could we expedite getting this into a draft, either Box Model or
> something else, so Chrome can do a prefixed impl with a decent
> reference?  I volunteer to write the text.
>

Just in case, I am using the following construction:

div
{
   width:25%;
   height: width(30%);
}

So height will be 30% of computed value of the width.

The 'width(percentage)' is a kind of function that describes base/source of 
percentage operation.

There are logical problems (chicken-egg alike) with aspect-ratio or the like 
properties.

E.g. it is not clear what to do with this:

div
{
   width:25%;
   height:25px;
   aspect-ratio:0.3;
}

and meaning of the following is not clear too:

div
{
   height:25%;
   aspect-ratio:0.3;
}

That is actually even prohibited configuration by the CSS nature: 
compute-widths-and-then-heights.

So the aspect-ratio is a value of the height property and only the height 
and definitely not a separate property.

-- 
Andrew Fedoniouk

http://terrainformatica.com
















 

Received on Tuesday, 21 September 2010 05:17:46 UTC