[csswg-drafts] [css-align][css-grid] Suggestion: Allow Flexible Lengths for Grid Gaps (#6275)

thatcort has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-align][css-grid] Suggestion: Allow Flexible Lengths for Grid Gaps ==
It would be useful to be able to allocate extra space in a grid to the space between grid items. This would allow the grid cells to be sized according to their row/column max-content while still allocating space around them. To do this I suggest the option of specifying the row/column gap with a flexible length `fr` value.

This is different than justifying items within flexible grid cells since it retains the uniform column/row edges regardless of varying sizes of contained grid items.

Motivating use case:
CSS grids have been a huge help in laying out complex tabular data and components. Imagine a table that contains both right-aligned numerical columns and left-aligned text columns. As the table grows in width I would like the columns to remain horizontally compact, but equidistant from each other. Allocating space to the grid tracks results in problems: If a numerical column is set to justify-end, it will bump up against the next left-aligned column. If columns are set to justify-center within the column there will be a ragged edge as the items are of varying widths. Instead we want a column that doesn't grow and column gaps that do.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6275 using your GitHub account


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

Received on Friday, 7 May 2021 21:30:07 UTC