Re: [css3-multicol] pseudo-algorithm

On Feb 14, 2011, at 2:43 PM, Håkon Wium Lie wrote:

> Media queries is an option. But setting 'column-width' is easier.

'min-width' on the multicol element is also pretty darn easy, if you want to maintain auto column widths.

I think media queries would be a great way to handle it though, if you really wanted something that was several columns on a big monitor and one column on a cell phone (with maybe a couple other choices in between). It seems like a pretty intuitive way to author multi-columns, and still pretty easy. A few minutes of testing would reveal if you got the numbers right.


>>> This will not be the most common case, and we
>>> shouldn't really encouage its use -- unless author really wants a specific
>>> number of columns. 
>> 
>> Experience indicates that 'encouragements' have limited influence on what 
>> authors do in practice.
> 
> Sure. But if they chose to set column-count and column-gap to specific
> values, perhaps they mean it?

Yes. That's my view.


>>> In this case, I do think we should "follow the
>>> principle of least surprise" and not try to make advanced adjustments
>>> which may or may not be what the user/author/designer wants. Brad's
>>> likening of 'padding' to 'column-gap' is a good one.
>> 
>> It's hard to argue that this is both a fallback scenario - i.e. not the primary
>> use-case - *and* what the designer wants. 
> 
> In a few cases this will be what the designer wants. 

Exactly.

>>> For this algorithm, we have three options that I can live with:
>>> 
>>> 1) keep the current algorithm
>>> 2) revise line 24 (by adding 1)
>>> 3) always honor column-count
>>> 
>>> After reading Brad's arguments, I'm leaning towards 3.
>> 
>> I don't see how 3 is doable since this specific branch of the algorithm 
>> deals with the case where there isn't enough room for the column gaps implied 
>> by column-count i.e. the only way to make everything add up would be to make
>> the column-widths negative.

The way I see it, is that we could:

A) Not let the width of the multicol element be less that the total of all its column gaps, but columns widths can be auto-sized down to zero. This is what life is like in the DTP page design world. Or...

B) Once columns become zero and the multicol element is too narrow to fit all the gaps, then start reducing the gap width.

I think I would be fine with either one. Since the gap reduction  in "B" is really, really a last resort of the UA to honor the multicol width, it is not too surprising, and still allows zero width columns to be equally spaced. But since we are usually talking about 'width:auto' making the multicol narrow, so "A" has an appeal to me too (the width "auto"-matically does not get narrower than all the gaps).

A.2) would be letting the gaps overflow the multicol.

Received on Tuesday, 15 February 2011 16:32:01 UTC