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

Re: New layout language.

From: Orion Adrian <orion.adrian@gmail.com>
Date: Thu, 7 Jul 2005 08:46:15 -0400
Message-ID: <abd6c8010507070546c7def3@mail.gmail.com>
To: www-style@w3.org

On 7/7/05, Lachlan Hunt <lachlan.hunt@lachy.id.au> wrote:
> 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.

No, it wouldn't. It would depend on what was specified as the canvas
size (new term, old term was initial viewport size (as specified in
code)). I appologize for the inconsistency in naming and for not
presenting more consistently this critical part.

I mentioned that the viewport was coded up as a region two with a
upper left coodinate of (0,0), and a size of (width, height), a
coordinate growth of (0%,0%) and a size growth of (100%, 100%). This
can be shortened to just (width, height) since the other numbers will
always be known.

> 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.

What was mentioned once or twice and it present and clear in the code
is that you also provide the canvas as a region (I was calling it a
viewport, but decided to call it canvas in the code, sorry).

The canvas represents the initial values for the canvas to be compared
against the current size of the viewport. The code is pretty simple.
Take a look at it.

Again, I finished a mockup of it yesterday to prove that the system
worked and it does.

-- 

Orion Adrian
Received on Thursday, 7 July 2005 12:46:21 GMT

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