Support auto track definitions
Auto tracks are generated automatically when the placement algorithm places an item outside the range of the templated tracks. This could be useful in some cases.
Which type of track would you pick, though? The relatively heavy IntrinsicContentTrack? Or a FlexibleTrackSizeTrack(1)? Not sure if we can come up with an intuitive default. Alternatively, in case of 'missing' tracks, we could not crash/error but instead show overflow bars (on debug builds) and otherwise ignore this content?
Which type of track would you pick, though? The relatively heavy IntrinsicContentTrack? Or a FlexibleTrackSizeTrack(1)? Not sure if we can come up with an intuitive default.
No defaults! We let the user decide.
https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows
Alternatively, in case of 'missing' tracks, we could not crash/error but instead show overflow bars (on debug builds) and otherwise ignore this content?
Agreed that a crash is a little harsh. Let me think about it.
I think this should actually be quite straightforward to implement. All you'd need to do is resize to fit the item your placement grid instead of throwing an error. I have an implementation of this for my CSS Grid implementation here. As you can see, it's quite short and straightforward. And mine is actually quite a bit more complex than I think you'd need as it needs to support negative indexes (adding negative implicit tracks is a massive pain as it means the origin of grid moves!)
For performance reasons I also have some logic to estimate the required size ahead of time (by scanning through the grid placements and spans of every item and finding the min/max - you'd only need the max). The logic for that is here. This doesn't completely guarantee no resizes as auto-placement can still generate more tracks but it helps in the "explicitly placed out of bounds" case.