W3C home > Mailing lists > Public > www-style@w3.org > May 2004

Re: auto units versus 'auto' value

From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
Date: Sat, 22 May 2004 19:20:01 +1000
Message-ID: <40AF1B41.1020503@iinet.net.au>
To: W3C Style List <www-style@w3.org>

Andrew Fedoniouk wrote:
> The main idea of %% is exactly to solve "amorphity" of 'auto' in places
> where it used as a width of free space.

   As a concept, it seems reasonable to want a method that can calculate 
a length based on the /free space/ available (either vertically or 
horizontally) however, the proposal you have given for %% units, has 
some serious problems.

   Firstly, you wrote in a previous post [1] that it would make no sense 
to apply the units to the positioning proerties, 'top', 'right', 
'bottom' and 'left', but if a unit is defined correctly, then I see no 
reason why it shouldn't apply to those.

   Secondly, you make the assumption [2] that whenever the units are 
used, then the sum should be normalised to be no more than 100% of the 
free space, whereas the author may actually want the sum to be exactly 
what was given.  (correct me if I've misunderstood this)
eg.
the elements to make three columns are:
<container>
   <col/><col/><col/>
</container>

with the style:
container { display: block; }
col:first-child { width: 100px; }
col { width: 60%%; float: left; }

   The last two cols should add up to 120% of the free space, however, 
if I've understood correctly (and haven't become totally confused), your 
current proposal would mean that each element would only get 50% of the 
free space.  If the calculations do add up to be more than 100% of the 
free space, then it should just overflow using the normal overflow rules.

[1] http://lists.w3.org/Archives/Public/www-style/2004May/0146.html
[2] http://lists.w3.org/Archives/Public/www-style/2004May/0403.html
-- 
Lachlan Hunt

http://www.lachy.id.au/
lachlan.hunt@lachy.id.au
Received on Saturday, 22 May 2004 05:20:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:30 GMT