Re: [css3-multicol] unknown available width and shrink-to-fit

Le 30/11/2012 14:29, Bert Bos a écrit :
> whether the used width can be calculated before
> 'column-width' and 'column-count or not.

Unfortunately it is still unclear for me what that means. This never 
happens in my mental model of layout. Details are below.


> [...]
>        + Otherwise (i.e., the cell is part of a table to which the
>          “fixed table layout” algorithm is not applied), then
>          available-width is initialized to unknown.
> [...]
>        + If the element is out of flow (see section 9.3 “Positioning
>          schemes” in [[!CSS21]]) and its 'width' is either ''auto'' or
>          a percentage of a containing block whose width depends on this
>          multi-column element, then available-width is initialized to
>          unknown.

Why is it necessary to determine the used column-width and column-count 
before the used width in these cases?

Are these really the only cases in this category? (Think for example of 
a table cell that is not multicol itself, but has a multicol child.)

What does "containing block whose width depends on this multi-column 
element" mean exactly?


Here is my understanding of "used width". Multicol only applies to block 
containers. The used width of the block container is determined by a 
different algorithm depending on its "type":

* For table cells, the fixed or automatic table layout as described in 
section 17.5.2 of CSS 2.1
* For other CSS 2.1 types (blocks in formal flow, floats, abspos, etc), 
one of the algorithms in section 10.3.
* New layout modes like Flexbox define their own algorithms.

Now the important part is that (AFAIK, correct me if I’m wrong) when any 
of these algorithms "depends on the content", it is only based on 
min-content and max-content. (In 2.1 terms, the preferred minimum width 
and the preferred width.)

The algorithms for min-content and max-content are not defined in 2.1, 
but they are in css3-sizing, including for multicol elements. There, 
they only use the *computed value* of column-count and column-width.

Therefore, I find apparent that it is not ever necessary to determine 
the used column-width and column-count before the used width: 
"available-width" should never be unknown.

Evidently you think otherwise. This is probably due to a different 
mental model of layout. Could you explain what part precisely of my 
reasoning above you disagree with, to arrive to an opposite conclusion? 
Or maybe give in more details your understanding of layout with respect 
to intrinsic/preferred widths?

Thanks,
-- 
Simon Sapin

Received on Friday, 30 November 2012 14:37:09 UTC