Re: [csswg-drafts] [css-grid-2] Ability for grid items to automatically span rows and columns based on content size (#1373)

I'd like to add another vote for this kind of feature.

I have uses cases where, to either avoid or minimize text overflow, I'd want grid items to auto-snap their size to the next column or row boundary, _if_ the other dimension is constrained by an explicit or max value. Oversize items that start at the end of the grid axis (last cell) would simply wrap to start on the next column or row. 

Would this maybe be an extension to the `overflow` spec combined with Grid? 
For instance: `overflow: next-column | next-row | minmax(next-column, row-end)` or would we need to separate this as `grid-overflow`?

Could you have a combination of of this behaviour that, if it expands up to a maximum, will then obey a second, standard overflow behaviour? I.e:

`grid-overflow-rows: 3, ellipsis;`

would overflow the cell to a maximum of 3 rows, and at that point, if the text is still too long, truncate it with an ellipsis. 

The next question I'd have is specificity. If I added it to a top-level Grid container element, would it automatically detect overflows in contained divs? 

If I applied it to a lower-level div, could I expect it to communicate its overflow state upwards to the grid container, etc? 

(And obviously, implications for subgrid etc.)






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

Received on Friday, 14 June 2019 21:43:30 UTC