Re: Backwards and Forwards Compatability

On 7/13/05, Laurens Holst <lholst@students.cs.uu.nl> wrote:
> Orion Adrian wrote:
> 
> >After thinking about this, I've determined that it's forwards
> >compatibility is nice, but difficult to achieve if you're not very
> >careful.
> >
> >So I thought about the guidelines for this and I present them here.
> >
> >1) No new property should require non-normal values of old properties
> >to work (e.g. display: absolute and margin).
> >
> >
> 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. 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:

|
   |
|
|  
   |

-- 

Orion Adrian

Received on Wednesday, 13 July 2005 12:33:12 UTC