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

> -----Original Message-----
> From: fantasai [mailto:fantasai.lists@inkedblade.net]
> Sent: Wednesday, March 18, 2015 9:40 PM
> 
> Here's my suggestions:
> 
> 
> col-count only
>    min = #cols * min-content [of contents]
>    max = #cols * max-content
>    Implemented by: Firefox, Chrome, IE
> 
>    Rationale:
>      Width of columns is totally flexible,
>      so pick a size that respects min/max-content

Agree on this one with the gap space added to the above sum.

> col-width only
>    min = min(col-width, min-content)
>    max = col-width
>    Implemented by: Firefox, IE
> 
>    Rationale:
>      Widest possible column is column-width*2-ɛ.
>      But if columns happen to be column-width (as requested),
>      then any content outside that overflows and is clipped.
>      It makes sense that the column-width becomes a limit
>      on the content's size contribution.
> 
>      The narrowest possible column is zero. If the min-content
>      is less than the column-width, then we can become that
>      small.

Almost agree. Having a MAX < MIN looks weird. The same problem with gaps missing as the previous.

> col-width + col-count
>    min = min(col-width, min-content)
>    max = col-count * col-width
>    Implemented by: Firefox, IE
> 
>    Rationale:
>      The layout as the container gets narrower (fewer columns)
>      approaches the col-width only case (reduce columns as
>      width reduces in order to keep each column >= col-width),
>      so it makes sense to have the same behavior.
> 
>      The multi-column spec wanted column-width * column-count,
>      when both were defined, to be the preferred width, and
>      the implementations reflect this. Authors would probably
>      prefer that shrink-to-fit sizing landed on this answer
>      for maxed-out cases as well.

Agree with this one but did drop the column-count from the calculation of min by mistake?
http://codepen.io/anon/pen/ogmQwp 
Also, the same problem about max being less than min as above.

> col-width + height
>    min = used col-count == 1 ?
>            min-content : column-width * used column count
>    max = column-width * used column count
>    Implemented by: Nobody
> 
>    Rationale:
>      Any other answer results in overflow, which no intrinsic
>      size should ever result in.
> 
>      Also this case hits a number of real-world use cases,
>      and they would like the max-content size to be as described.

The rational seems reasonable. Is there a reason we would ignore the size of the column in case column-count==1 ? The following seems more appropriate to me:
min = used col-count == 1 ? min(min-content, column-width) : min(min-content, column-width) * used column count

Cheers,
Rossen

Received on Wednesday, 25 March 2015 22:59:10 UTC