Re: [csswg-drafts] [css-flexbox][css-grid][css-box-sizing] - Wrapped text does not reduce box size width (#4801)

There's a subtle difference in how flexbox and grid work this out, flexbox works from max-content and removes space. Grid works from min-content and adds space. You can see this difference in my fork: https://codepen.io/rachelandrew/pen/abOBgBM. However to do what you are suggesting I think would involve doing that work, then going back over to see what the resulting sizes were and doing another pass to redistribute space. 

You only have two words in your long content, however if you consider a grid track with lots of different items in a column of varying sizes. They would all need to be laid out (as you presumably don't want everything at min-content size) to work out how big they actually are and if there is some extra space due to that wrapping which can then be redistributed. Whether that's feasible, I don't know, but it seems like a lot of work. 

Seems like it might be more called for in flex layouts than grid. Where I can see the use case of wanting more space round the items, and we are only dealing with one flex line in terms of the distribution. I think in grid you might be better to more proactively control your column sizes than leave them to be auto sized.

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

Received on Sunday, 23 February 2020 15:02:02 UTC