RE: [css3-multicol] pseudo-algorithm

Also sprach Alex Mogilevsky:

 > Well, yet another option is to honor both column count and column
 > gap and to simply produce overflow. That may not be that bad -- in
 > a way you would treat column-gap as padding (it never shrinks and
 > it can overflow).
 > 
 > Also, if a column-min-width is eventually introduced it makes perfect sense to have 
 > 	
 > 	min-content-width = min-column-width * column-count + column-gap * (column-count - 1) 
 > 
 > multicol content just can't be more narrow than that...

One problem with 'min-column-width' is that it's hard to give it the
right value. The most sensible value would probably be the longest
(unbreakable) word. Or maybe the widest image? This quickly brings us
to columns with varying widths. Hmm.

For now, I think I prefer your other solution:

 (20)    else
 (21)      N := column-count;
 (22)      W := 0;
 (23)      column-gap := (available-width/column-gap);
 (24)    fi

This will allow us to add the concept of 'min-column-width' in the
future.

Cheers,

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

Received on Tuesday, 8 February 2011 21:44:57 UTC