Re: Suggestion for multi-column layout: pseudo-elements?

Also sprach Kelly Miller:

 > I noticed a while ago that part of the multi-column layout module in CSS 
 > adds a bunch of properties like column-padding, column-border, and so 
 > on.  I was just wondering why it wouldn't be possible to create a 
 > pseudo-element like nth-child to cover styling columns.  It wouldn't be 
 > too hard to logically figure out...
 > 
 > If column-count isn't set, then it's asssumed to be 1.  Then one can 
 > simply set properties on the pseudo-elements.  Simply disallow the use 
 > of width, height, float, position, margins, content, and other such 
 > things that you don't want people to do in columns (so columns only flow 
 > text).  Wouldn't that be easier and more semantically correct than 
 > creating a bunch of properties that do things CSS already does?

Reuse of properties is good, in principle. However, I don't think the
currently proposed properties [1] are redundant. For example, to flow
the content of an element into two colums with a gap and a border
between them, you can say:

  P {
    column-count: 2;
    column-gap: 1em;
    column-rule: solid black 1pt;
  }

How would you express the same presentation in your proposal?

[1] http://www.w3.org/TR/2001/WD-css3-multicol-20010118/

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Monday, 16 May 2005 20:33:29 UTC