Re: [csswg-drafts] [css-grid] "grid-column: 1 / -1" should span all columns

One other issue @fantasai brought up [on Twitter](https://twitter.com/fantasai/status/976547857254645761): What if span-all elements create a situation where there is no available cells for auto-placed items?

Examples:

- A grid item with an explicit column number, auto row position, but that entire column is covered by a `span all`.
- Completely auto-placed grid items, but in a grid with a fixed number of columns and auto-generated rows, where there is a `span all` item in every column.

My response was:

If the author defines grid items that can't help but overlap, they overlap. Same as for explicit placement. 
 There would need to be an explicit check: If no amount of adding auto-generated tracks will ever create room, don't add any tracks.

_But_ of course, it's not that simple. You'd still need to adjust [the placement algorithm](https://drafts.csswg.org/css-grid/#grid-item-placement-algorithm) to define exactly where the overlap occurs: whether it changes for sparse vs dense packing, and how you adjust when you have a mix of fixed-span and span-all elements in the way.

So, if anyone wants to come up with a draft algorithm that could do that, it would probably be an important first step in moving forward... 😉

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

Received on Wednesday, 21 March 2018 21:15:54 UTC