Re: Need for CSS to overcome Table-based formatting, Need for CSS to simulate all HTML format-based elements,, My proposal for CSS frames, My proposals for new :empty pseudo-class, My new display: types, New replace: property, New :empty-column pseudo-element, New children variable(!)

--- I <thelawnet@yahoo.com> wrote:

> The issue of reducing TABLE column formatting to CSS
> is rather more vexed.
> 
> Consider:
> 
> <table border="0">
> <tr>
> <td valign="top">
> This is a column
> </td>
> <td valign="top">
> This is another column.
> </td>
> </tr>
> </table>
> 
> If we have TABLE {display: block} TR {columns: ?},
> then there is no way of knowing the number TDs in
> the
> row.
> 
> We couldn't use a counter function on the TDs for
> the
> following reasons: 
> 1. CSS doesn't allow the value of counter functions
> to
> be referred to;  
> 2. Even if it did, the performance problems would be
> prohibitive - the row couldn't be rendered because
> there would be no way for the UA to know whether the
> counter was incremented later on.
> 
> The only possible thing we could do is introduce a
> children variable.
> 
> E.g, TR {columns: children}
> 
> I think this would solve a lot of the problems
> caused
> by the fact that columns, surely a core function,
> were
> not even introduced in CSS-2, never mind CSS-1,
> meaning that columns MUST be done by TABLEs, which
> don't work properly - different resolutions, fonts,
> even browsers, cause massive gaps at the bottom of
> columns, meaning that the need for a way to collapse
> TABLE formatting techniques without a rewrite of
> millions of pages is overwhelming.


Of course if we allow :contains, we can do this

TABLE[border=/"0"]:contains(TR > TD:first-child + TD +
TD + TD:last-child) {columns: 4}

TABLE[border=/"0"]:contains(TR > TD:first-child + TD +
TD:last-child) {columns: 3}

With TABLE[border=/"0"] TD {display: inline}
Etc.

=====
----------------------------------------------------------
From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

Received on Monday, 8 November 1999 08:10:18 UTC