W3C home > Mailing lists > Public > www-style@w3.org > July 2005

Re: Backwards and Forwards Compatability

From: Laurens Holst <lholst@students.cs.uu.nl>
Date: Wed, 13 Jul 2005 14:51:11 +0200
Message-ID: <42D50E3F.1030109@students.cs.uu.nl>
To: Orion Adrian <orion.adrian@gmail.com>
Cc: www-style@w3.org

Orion Adrian wrote:

>>That is already the case, at least in the example you provide. The top:,
>>left:, bottom: and right: properties are meant to be used in conjunction
>>with absolute positioning. That is precisely why I asked why Kris did
>>use margin instead. He was unnecessarily mixing two posioning methods.
>>Of course, when margin is used to create spacing *within* absolutely
>>positioned areas, as I believe Kris did in a later example, it is
>>relatively safe and correct.
>>    
>>
>Currently, it is not possible to use simply use left to get the
>correct position without margin-left to get it done correctly as well.
>Left can either serve as a constant portion or a percentage portion of
>a layout, but in layouts where both are required left is no
>sufficient, so margin must be used. This breaks guideline 1. To get
>both you would indeed need calc for it.
>
Yes, this is merely a workaround, caused by calc() missing. It does not 
only apply to combinations of absolute units with percentages, but 
applies to any combination of different units, e.g. you have the same 
problem with three boxes of 5em, 500px and a stretching third one. When 
adding more columns with different units, you will need to resort to 
border and padding next, and after that you can go no further.

But, it is not breaking guideline 1. Absolute positioning does NOT 
require such use of margin to work. Hence your claim that the design of 
absolute positioning is flawd and not designed to degrade properly is 
incorrect.

The reason that margin is used, is because achieving certain types of 
layout with purely absolute positioning is currently not possible yet. 
Absolute positioning will indeed need calc() to become more *powerful*. 
E.g.:

+-+---+--+ (possible)
|5|   |5%|
+-+---+--+

+-+--+---+ (not possible)
|5|5%|   |
+-+--+---+

But, as said, those are just the limits of absolute positioning without 
calc(), as we currently have it, not a flaw in its design with regard to 
your ‘guideline 1’. Limits which can ‘shortsightedly’ be worked around 
by using margins, borders, or paddings, but that will not degrade well.

> Instead, he uses one to handle
>the percentage part (left) and one to handle the constant part
>(margin). As for the safety of his example, it wasn't very safe. If
>position: absolute hadn't worked, he would have had quite a mess with
>different regions being statically placed, but with left and right
>margins of different sizes. Something like this:
>  
>
Correct. But now you are argueing about the example Kris gave, not the 
design of CSS.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.
Received on Wednesday, 13 July 2005 12:51:13 GMT

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