Re: New layout language.

Kris@meridian-ds.com wrote:

>With that said I went to the
>trouble of duplicating what you were asking for in css. it is as follows:
>
>.left {
>      position:absolute;
>      width:200px;
>      margin-left:10px;
>      height:100px;
>      border:1px solid #000000;
>}
>
>.right {
>      position:static;
>      margin:10px;
>      margin-left:222px;
>      border:1px solid #000000;
>}
>  
>
Why use margins instead of left, right, top, bottom, (min-/max-)width 
and (min-/max-)height? Why use static positioning?

.left {
    position: absolute;
    width: 200px;
    left: 10px;
    height: 100px;
}
.right {
    position: absolute;
    left: 220px;
    right: 10px;
}

I’d say with that we have covered all "0%" and "100%" cases, with 
existing CSS functionality.

With regard to the ‘percentual scaling’ you mentioned, I doubt whether 
that is actually something useful to have. If I look at existing 
websites, very few actually use percentages to define widths. For text 
boxes, it’s usually { min-width: 10em; max-width: 55em; } that makes the 
most sense, stretching as necessary up to 55em (beyond which the lines 
get too long). For graphics, pixels are the unit people are working 
with. If you look at UI in applications, sizing like this is also used 
very infrequently.

Additionally, you could do that in CSS too (somewhat), by specifying 
min-widths with absolute values and using percentage values, although 
for an exact duplication of what you desire or more complex things you 
would need calc() (which CAN get a bit messy, but it does the job) (or 
%%, if it would work with absolute positioning, heh ;p), e.g.:

.left {
    position: absolute;
    width: 200px;
    left: 10px;
    height: 100px;
}
.right {
    position: absolute;
    left: 220px;
    right: 33%;
    min-width: 100px;
}

So I think what you are proposing basically looks like some extensions 
to absolute positioning. Which might be a good idea. But you should 
position it as such then.

There is another thing that would be useful, which you have not 
addressed in your proposal: box A and box B are placed next to 
eachother. However, if their minimum size exceeds the size of the 
window, they could be put below eachother. Kinda like floats interact 
with eachother, but then different. Absolute positioning + float. Or 
something. Currently, the solution for that is to use media queries. 
Which might be sufficient as well. Anyways, your proposal doesn’t 
address that, while I think that would be one of the things that would 
make it a valueable addition.

Orion Adrian wrote:

>I haven't specified a syntax. This language is designed to replace the
>functionality of CSS layout and would use a different syntax. It's
>region based and not class/id based.
>
Why?? Just for the sake of doing things different? Functionality put 
aside, I see nothing here that would warrant a new language that is 
separate from CSS. All of this could be (made to be) expressed in CSS.

Placing content at a certain location using ‘regions’ or an ID or @role, 
I don’t see a difference.

>left {
> top: 10px;
> left: 10px;
> height: 400px + 100%;
> width: 200px;
>}
>
That looks nice. But again, first of all I have my doubts about the 
usefulness of specifying percentages, but most importantly, this looks 
awfully much like absolute positioning to me.


Kris@meridian-ds.com wrote:

>min-margin:
>
Kris, why use margin at all? Margin is for margins. Not for positioning.


~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, 6 July 2005 13:51:45 UTC