W3C home > Mailing lists > Public > www-style@w3.org > June 1999

Re: Style and <frameset>

From: Peter Linss <peterl@netscape.com>
Date: Tue, 15 Jun 1999 19:26:00 -0700
Message-ID: <37670B38.B0352881@netscape.com>
To: Nicolas Lesbats <nlesbats@etu.utc.fr>
CC: Håkon Wium Lie <howcome@operasoftware.com>, www-style@w3.org
Nicolas Lesbats wrote:

> On Mon, 14 Jun 1999, Peter Linss wrote:
> | >         head { display: none }
> | >         link[] { display: table-cell }
> | No, it's not correct, the 'display:none' will cause the head and all of its
> | children to not display.
> Oops... So I could have written :
>         head { display: block; visibility: hidden }
>         link(...) { display: table-cell; visibility: visible }


> (since BODY and LINK use absolute positioning)
> | > But how can I specify the number of
> | > columns, the table width, etc. since no element in the document source is
> | > defined as being a table, inline-table or even a table-row ?
> |
> | Set the <head> to 'display: table-row' if you want each link in a cell in the
> | same row. Otherwise you can set the <head> to 'display:table' but each link
> | will be in its own row.

David Baron is correct, adjacent cells should stay in the same row.

> Yes, but there are limits in both cases. And I don't want the HEAD to be
> a table. And I won't be able to always find a parent element to play the
> role of table or table-row anyway... That's why it seems to me too
> that pseudo-elements for "anonymous frames" (as you say) are really
> necessary.

Yes, there are still limits. Consider this XML:

Now you can't change the document tree (because say it already has some structural
meaning) but you want the <foo> to display as a table, with the <bar1>s as cells on
the first row, and the <bar2>s as cells on the second row.
CSS won't get you there (yet), the standard answer is to use XSL (or some other,
maybe declarative) transforms to create a new content model.
But, I've been mulling around an idea whereby CSS can do this. The gist of it is
you declare a "display prototype", say:
@prototype foo-table {
  foo-row: child-type(bar1);
  foo-row: child-type(bar2);

Then you can have rules:
foo { display: prototype(foo-table); }
bar1, bar2 { display: table-cell; }
:foo-table { display: table; }
:foo-row { display: table-row; }

So for something with a display type of "prototype(foo-table)", you get formatting
objects like:
    (children of type <bar1>)
    (children of type <bar2>)

The syntax for declaring the prototypes needs to be fleshed out, but the idea is
that you should be able to declare an arbitrary structure of pseudo-elements that
the children of the node get mapped into according to specific rules (type, class,
id, index...)



> --
> Nicolas Lesbats - nlesbats@etu.utc.fr
> 85 r. Carnot 60200 Compiegne - France
>  +33/0 686 800 908
> Plaider <http://wwwassos.utc.fr/~plaider/>
> 3:-) Moooooooooooooooooooooooo !
Received on Tuesday, 15 June 1999 22:27:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:50 UTC