layout sheet proposal

I have an idea that came out of my research into the frightening hacks
that are used to get XHTML/CSS to do columnar or grid layouts that work
cross-browser (http://www.alistapart.com/stories/journey/, et al.). I'm
a non-tech person, more or less, and I’m hoping the moderator will
quietly delete this message if the following is already being discussed
or just plain ignorant.

Layout and text formatting are distinct typesetting problems. Tables,
for all their woes, are the only decent mechanism available for
describing how things relate to each other in a columnar or grid-like
way on a web page. “Clear” and “float” sound like bits of cork bobbing
around a birdbath, which seems to be analogous to what happens when
these attributes fail to work as intended. I’m going to guess that any
mechanism that succeeds in solving this problem is going to be no
prettier than tables.

My idea is to create a new kind of style sheet in upcoming versions of
CSS that would be dedicated to layout exclusively. Maybe they could be
called “layout sheets.” It might go something like this:

Let’s say you wanted to build a classic three-column web page, with
navigation on the left, content in the middle, and links on the right.
The style sheet, which from now on would be devoted to the formatting
 of text, would appear as always:

p {font-family:"Verdana", "sans-serif"; color:"#000000";
 font-size:13px; line-height:15px  }
a, a:visited, a:link {color:"#444444"; font-weight:normal;
text-decoration:underline }

Et cetera. The layout sheet would look like this:

<table>
<tr>
<td>#navigation</td>
<td>#content</td>
<td>#links</td>
</tr>
</table>

Or if resurrecting deprecated tags was a no-no, make up new, more
descriptive ones, which might be a good idea anyway (<grid>, <row>, and
<col>, perhaps).

If the first file was called “format.css” and the second “layout.css,”
the document would look like this:

<head>
<link rel="stylesheet" href="format.css">
<link rel="layout" href="layout.css">
</head>

<body>
<div id=”navigation”>
<p>Navigation goes here.</p>
</div>
<div id=”content”>
<p>Content goes here.</p>
</div>
<div id=”links”>
<p>Links go here.</p>
</div>

</body>

Let’s say in the future you want to go to a three-row layout instead of
three-column. Do nothing to the document; go to layout.css and change
 it to

<table>
<tr><td>#navigation</td></tr>
<tr><td>#content</td></tr>
<tr><td>#links</td></tr>
</table>

Voila. All linked documents would be updated to a top-middle-bottom
layout. In a way, it’s the converse of frames - content resides in the
document and layout is imported, instead of the other way around.

This ought to keep everyone happy. Presentation remains separate from
content, designers get the control they want over the grid, multiple
layouts are mandated from a single document, and the page ought to
degrade beautifully.

I hope this is a viable idea. I’ll go crawl back under my area of
expertise. Thank you for listening.

Franklin Einspruch
http://www.einspruch.com

Received on Tuesday, 24 December 2002 12:28:34 UTC