Re: layout idea

> It feels like this is nearly exactly like Grid Layout, except not
> quite as flexible.

There are things within Grid Layout that do give it some flexibility,  
such as the ability to define repeating grid sequences).

> As well, it commits the (what I consider a) sin of defining the page's
> layout only in the aggregate - you have to know *all* of the matrix
> declarations to figure out just how many cells are in the grid.

Grid Layout has this problem as well. You can define repeating grid  
patterns. Therefore, you can't determine the page layout until all  
items are placed within that grid.

A concern of mine with grid layout is how an element's dimensions are  
determined (assuming the grid-columns/rows is defined on an element  
and not the body). Take the following example HTML/CSS:

<div id="a">
   <div id="a1"></div>
   <div id="a2"></div>
</div>

#a { grid-columns: * *; grid-rows: *; }
#a1 { position: absolute; top: 0; bottom: 1gr; }
#a2 { position: absolute; top: 0; bottom: 1gr; }

How tall is #a? If absolute positioning takes the elements outside of  
document flow, and a grid row height is flexible, how do you determine  
that? This is why I took the approach I did.

I also dislike that elements now have a more verbose syntax to lock  
all sides to the grid (which, to me, seems like the more common use  
case).

Example:

foo {
   position: absolute;
   left: 1gr;
   right: 2gr;
   top: 1gr;
   bottom: 2gr;
}

> Andrew does make an excellent point wrt the weaknesses of using the
> position property for specifying grid, namely that it prevents you
> from doing things like position:relative on the blocks afterwards.

Yes, I admit that it has this weakness. It is a weakness I'm willing  
to have in there to maintain the simplicity of implementation. If the  
issues with the Grid Module can be worked out, I'm okay with that. I'd  
rather see a simpler implementation (with limitations and all) get  
implemented sooner than a complex solution implemented later (or not  
at all).

-js

Received on Monday, 16 March 2009 02:44:24 UTC