Re: Column proposal in CSS-3 - Need for :column pseudo-class, etc.

On Thu, 14 Oct 1999, Web Master wrote:
> 2. However, there is definitely a need for a :column pseudo-class
> (note NOT pseudo-element).

I think you misunderstand what a pseudo-class is. A pseudo-class
matches an existing element in the document tree (think of this as
analogous to a normal ".class" rule). Columns create *new* elements,
that are not in the document tree. They are pseudo-elements.

For example, the original source would be:

   <p>This is text in a column, this is text in a column, this
   is........ </p>

...but with this markup:

   p { display: 2 columns; }

...the document would display as:

   This is text in   is text in a       
   a column, this    column, this is....

...where :column(1) would match the box of first column, and
:column(2) would match the box of the second column.


> Thus the proposed column-* properties would be kept, but allow,
> e.g., :column(1):first-letter {float: left; font-size: 64pt;}

My :column proposal is completely at odds with the current proposal,
so keeping both would be a nightmare to specify. And it would be very
redundant.

The idea with my proposal is that each column is a CSS block box,
which means that behaviour is already specified. The current proposal
introduces a whole bunch of new exceptions. My proposal (which of
course is actually not really mine me but is based on the comment at
the end of the current spec) is much more versatile.


On Thu, 14 Oct 1999, Dmitry Beransky wrote:
> If I'm not mistaken, there is a situation where the final number of
> columns is unknown to the author, but is decided by the UA on the
> fly. This means that there needs to be a way to at least select the
> last column (:last-column?). Would/should it be possible to use the
> last column as a reference point and count backwards? >

That would be good, but no rule that could change the size of the
column could be used, for example: border-* margin-* padding-* height,
width, font-size (because lengths can be dependent on em), etc....

The reason for this is obvious if you try to imagine the result of:

   P { display: columns; }
   P:column(1) { width: 50%; }
   P:column(2) { width: 40%; }
   P:column(3) { width: 20%; }
   P:column(last) { width: 60%; }

The first column would be 50% wide, the second 40%, and the third
would not fit. So it would try to have two columns. That means that
the last column would be column 2, which would thus be made 60% wide.
But of course that would mean it could not fit. So the last column
would be column 1, which would be made 60% wide, but then column 2
would fit, so it would be the last column. So it would be made 60%
wide, and.... ARG!

So the :column(last) pseudo-element would be limited to colour and
background type stuff. Is it worse it?

-- 
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 Thursday, 14 October 1999 16:53:45 UTC