Re: [csswg-drafts] [css-align][css-multicol] 'justify-content' other than 'normal' or 'stretch' should change column count/size rules

@tabatkins, correct.

1: this is now gone, since we have resolved on #2145 

2+3: Your description is correct, that is what my preference is. It is a mild preference, so if you're opposing it with a strong objection, I guess I'll just fold (unless more people come out with stronger preferences / objections).

But, or the sake of the argument, my logic is as follows.

Multi-column typically contain in-flow body text. Without a gap, things would be unreadable, as lines of text across columns would seem connected. You need a way to say how much (at minimum) columns need to be apart when there's more than one of them. For this reason, you generally do not want to set the column-gap to 0. If there's only a single column, there's no need for separation at all, but column-gap doesn't create one, so all is good and you can just pretend there was no multicol at all and that you just got ordinary block layout. Once you do have separations and vertical white space, it is nice to be able to control how it's spread around, and that's where the alignment properties come in. You can use the padding trick to compensate for the column-gap, but then you lose the property of "when there's not much room, it's just block layout without any additional spacing or separation". This concern is not totally absent from grid or flexbox, but unlike multicolumn, grid of flexbox typically do not contain only in-flow body text (and do not contain a continuous flow of text fragmenting across the items), so the need to put some (variable amount of) whitespace around things doesn't necessarily go away when available space limits things to one item per row. Also, visual separation of the items may be achieved in other ways (backgrounds, borders, margins on the items, etc), so unlike multicol, setting the column (or row) gap to 0 is not necessarily a bad idea.

That would work if column-gap was treated as a minimum for the distribution space that only kicks in if there's at least one actual column gap (i.e. at least two columns).

Seems to me that this would more often just do the right thing without having to think about it.

Also, you cannot (easily) roll your own with media queries, and you'd need element queries to do this right, but we don't have those.

That said, while it seems to me that this would (almost?) always be the right thing to do for multi-col, maybe it would also sometimes be the right thing to do for flex-box and grid. Possibly we need to be able to switch between the two behaviors somehow, either with separate values or a separate property. But that does seem overkill.



-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1420#issuecomment-378799494 using your GitHub account

Received on Thursday, 5 April 2018 02:05:33 UTC