Re: Column proposal in CSS-3

On Fri, 15 Oct 1999, Web Master wrote:
> The point of the :column pseudo-class is not to <em>create</em>
> columns - these would be created by the column-* rules (this would be
> a pseudo-element); but rather too apply formatting to them.

We are at odds here, proposing diametrically opposing ideas.

My proposal [1], based on "variation #2" of the current spec [2],
removes ALL the current "column-*" properties [3], and simplifies the
entire system down to one new value on the 'display' property and one
new pseudo-element.

[Note, though, that even using the current draft spec, a :column
pseudo would be a pseudo-*element*. The :column(2) and :column(3)
selectors would not match a particular _element_ in the DOM, but a
particular subsection of an element. Think of how :first-letter is a
pseudo-*element* and not a pseudo-class, for example.]


> The point of the :column pseudo-class is to permit the very common
> situation where you would want different formatting on columns.
> Rather than specifying the properties explicitly on each column that
> is declared, we create a selector that allows us to apply formatting
> to all column elements at once.

My suggestion can inherently do all this; the current spec in fact has
no way of explicitly addressing each column.

Below are some things I would like to be able to do. All are possible
with my proposal (...which is based on variation #2). As far as I can
tell, none are possible using the current draft spec, even including
the :column pseudo-element you suggest.

  1. Different colour for the line between each column.

  2. Have a shorter first column, with a picture in the extra space.

  3. Put a border at the bottom of the second column.

On the other hand, as far as I can tell my suggestion _can_ do everything
that the current draft can.

-- References & Footnotes --
[1] http://lists.w3.org/Archives/Public/www-style/1999Oct/0056.html
[2] http://www.w3.org/TR/css3-multicol
[3] One exception is column-span. A more flexible way of doing this
would be to add an optional value on the 'position' property (say,
'wrap') which would have the same effect on line boxes as the 'float'
property does. You could then do something like this:

   div { display: 3 columns; position: relative; }
   h1 { position: wrap absolute; top: 0; left: 0; right: 0; 
     margin: auto; }

...which would have an effect equivalent to the current:

   div { columns: 3; }
   h1 { column-span: all; }

...but would be much more powerful. For example, it would allow
pictures to straddle the column gaps:

   div { display: 3 columns; } div:column { position: relative; }
   div img { position: wrap absolute; left: 50%; right: -50%; 
      margin: auto; }

This is not possible with the current draft AFAICT.

It would work by making the inline box model not place any line boxes
within the margin edge of a positioned element with 'wrap' set --
exactly like happens currently with floats.

-- 
Ian Hickson
"I take a Professor Bullett approach to my answers. There's a high
probability that they may be right."
  -- Dr Snow; Mechanics Lecturer at Bath University; 1999-03-04

Received on Friday, 15 October 1999 10:10:10 UTC