W3C home > Mailing lists > Public > www-style@w3.org > April 2015

Re: [css-multicol][css-sizing] Intrinsic Sizes of Multi-column Elements

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 1 Apr 2015 09:52:44 -0700
To: Simon Sapin <simon.sapin@exyr.org>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style@w3.org
Message-ID: <20150401165244.GA9714@pescadero.dbaron.org>
On Thursday 2015-03-26 14:19 +0100, Simon Sapin wrote:
> On 26/03/15 00:37, fantasai wrote:
> >>>col-width + height
> >>>    min = used col-count == 1 ?
> >>>            min-content : column-width * used column count
> >>>    max = column-width * used column count
> >>>    Implemented by: Nobody
> >>
> >>I think you'd need to lay out to find the column count here. Sounds bad.
> >
> >Yes. It makes layout engineers unhappy, but it's the only answer
> >that really makes sense, and it's required for a some real-world
> >use cases.
> This is not about happiness. It’s just that "To determine X, you first have
> to know X" is not implementable.

I agree that this proposal is completely unacceptable.  (I worry
that some similarly-unacceptable things might have been done in
flexbox, too, though I'm not sure.)

Implementing it would (if possible at all) be extremely ineffecient;
I think CSS should be moving towards giving developers efficient
primitives rather than giving them ineffecient solutions to complex
problems that will only hit a few use cases.

I think the use case fantasai wants to address should be handled by
describing a different layout algorithm for this case that works
much more like orthogonal flows work (like they should work; perhaps
not how they're currently specified).  For this, a multicol element
will, in some cases, be laid out one column at a time, and determine
its width based on the number of columns.  In other words, it uses
(in Latin directionality) the height as the input to its layout
algorithm and the width as an output.


π„ž   L. David Baron                         http://dbaron.org/   𝄂
𝄒   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Wednesday, 1 April 2015 16:53:16 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:50 UTC