Re: [csswg-drafts] [css-grid-3][masonry] Make auto-fit do things (#10274)

The CSS Working Group just discussed `[css-grid-3][masonry] Make auto-fit do things`, and agreed to the following:

* `RESOLVED: Make auto-fit drop tracks after sizing and placement, and apply content distribution to the tracks again afterward`

<details><summary>The full IRC log of that discussion</summary>
&lt;dbaron> fantasai: tab pointed out that the auto-fit value in masonry specs is designed to behave the same as auto-fill<br>
&lt;dbaron> fantasai: auto-fill will fit as many columns as fit in the containing block and leave that there<br>
&lt;dbaron> fantasai: auto-fit will do that, but then collapse any columns that are free after placement<br>
&lt;dbaron> fantasai: so we could do similar in masonry, but if we're doing auto sized columns it might not be as exciting<br>
&lt;TabAtkins> q+<br>
&lt;dbaron> fantasai: but we can redistribute the space if you have a fixed # of columns or an auto # of colums that ...<br>
&lt;dbaron> fantasai: so we can still do things like collapse the empty columns in masonry<br>
&lt;dbaron> fantasai: so if you have fewer items than columns or explicitly placed columns then you can end up with empty tracks<br>
&lt;dbaron> florian: any reason not to?<br>
&lt;dbaron> fantasai: I can't think of any reason not ot.<br>
&lt;dbaron> s/not ot/not to/<br>
&lt;dbaron> TabAtkins: a potential reason: if you move the columns around and potentially change size or gap between them (have spanners), this changes the size of things in the columns because they now have more space to flow into, which could make things shorter and could theoretically change column placement<br>
&lt;dbaron> TabAtkins: so your final masonry might end up more ragged than it would otherwise have been<br>
&lt;dbaron> TabAtkins: but that's largely a non-issue because your masonry is nearly empty<br>
&lt;dbaron> florian: but if you didn't want that, use the other keyword that doesn't do that<br>
&lt;dbaron> fantasai: also you can do this after track sizing<br>
&lt;dbaron> fantasai: size tracks, place items, figure out what's empty, don't resize the tracks afterwards<br>
&lt;dbaron> fantasai: doesn't reduce space into the tracks (like grid), but lets you redistribute spcae using alignment properties<br>
&lt;dbaron> fantasai: that track won't get empty, but increased gap size will increase available space to spanning item<br>
&lt;dbaron> florian: either way we're discussing whether it does the same as auto-fill, so if you don't want the rejiggering, use auto-fill<br>
&lt;dbaron> fantasai: further comments?<br>
&lt;dbaron> oriol: a question: if you use the align properties like align-content and set them to stretch, and then we can't stretch the tracks, does stretch not work on masonry?<br>
&lt;dbaron> oriol: is it just in this case where you're collapsing tracks... or in general?<br>
&lt;dbaron> fantasai: probably need to apply the distribution before placements -- size the tracks, apply alignment, then place items.<br>
&lt;dbaron> fantasai: if you want to do this drop tracks and then reapply values... wouldn't apply stretch because we don't want to resize the tracks<br>
&lt;dbaron> oriol: then if the values stretch, you have start alignment?  fall back to other alignment?<br>
&lt;dbaron> fantasai: I think you get start.<br>
&lt;dbaron> fantasai: I think you have the same problem in grid if you don't have any auto tracks and you say stretch.<br>
&lt;dbaron> fantasai: we might want to give stretch a fallback alignment option.<br>
&lt;dbaron> fantasai: should we do it?  I see Rachel nodding.<br>
&lt;fantasai> RESOLVED: Make auto-fit drop tracks after sizing and placement, and apply content distribution to the tracks again afterward<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10274#issuecomment-2162390469 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 12 June 2024 08:16:29 UTC