cssgrid-ama
cssgrid-ama copied to clipboard
span to end without specifying current line
I have an item which is placed on cell 2 of a 4 column grid and I can make it span to the end of the grid
by
grid-column: 2 / -1;
or
grid-column: span 3;
However, the first instruction requires the initial column line "2", and the second one also "3"=4+1-"2"
I would like to be able to span to the end without specifying the initial column line.
Said differently, if we can do span 3 or span 4, etc, why not a span -1 that would span from the current position to the end?
grid-column: span -1;
https://codepen.io/anon/pen/eERwBp
You can do it by only specifying the grid-column-end:
grid-column-end: -1;
or
grid-column: auto / -1;