Re: New layout language.

Orion Adrian wrote:
> Now there's nothing particularly tricky about that. But here's the
> thing, what happens when I resize the viewport? Now what I want is for
> the second region to grow with the viewport.

There's been something really bugging me about the whole concept you've 
presented, but until now I haven't been able to put my finger on it.  It 
seems that the model you have presented is conceptually broken, 
particularly in relation to the "growth rate".

> Figure 1 shows the before and after of a resize. As I increase the
> width of the viewport each region inside it resizes at a rate specfied
> by its percentage growth.
> 
> 0% indicates no growth at all.
> 100% indicates growth at the same rate as the viewport.

The problem is that, while you have clearly attempted to provide for 
differing viewport sizes, the initial size of the content when the page 
loads is not dependant upon that.

Using the layout example you gave in your initial post at the start of 
this thread:

> Region A (a region 1em down and 2em to the right of the viewport. The region 
> does not move or change size during a viewport resize; it will always be 
> 20em wide and 5em tall):
> 
> left: 0% + 2
> top: 0% + 1
> width: 0% + 20
> height: 0% + 5
> 
> Region B (a region that gains everything fromcontent body to the immediate 
> right of Region A):
> 
> left: 0% + 24 (calculate the right coordinate of Region A and add 2 padding)
> top: 0% + 1
> width: 100% + 100 (this will be 100em wide and widen 1em for every 1em the 
> viewport widens)
> height: 100% + 20 (this will be 20em tall and lengthen 1em for every 1em the 
> viewport lengthens)

You've clearly defined that the size of region A will be a fixed size of 
20em x 5em.  Since it doesn't "grow" in your model, that's not the 
problem.  Region B, however, does have a problem.

You say:
   "[Region B] will be 100em wide and widen 1em for every 1em the
    viewport widens"
and
   "[Region B] will be 20em tall and lengthen 1em for every 1em the
    viewport lengthens"

Say my viewport is approximately 150em by 150em tall wide when I load 
the page.  If I understand that correctly, then, with this layout, when 
I load the page region B will be 100em x 20em.

Then, I increase my window to 160em x 160em, and region B increases to 
110em x 30em, correct?

My question, and the reason why this model is conceptually broken, is 
what happens if, when I first load the page, my viewport *is* 160em x 
160em?  AIUI, region B will be only 100em x 20em, not 110em x 30em as it 
was when I resized my viewport after loading.

The problem is, as I said above, that the initial dimensions are not 
dependant upon the size of the viewport, yet you expect that resizing 
will be, which makes your model conceptually broken.

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Thursday, 7 July 2005 11:15:01 UTC