While working on my project, I've noticed inconsistency in the behavior of the random grids I'm generating with JavaScript. I specify a set number of columns and rows for the grid, as well as the start and end values of the cells independently. My goal is to have cells grow when their content overflows beyond the minimum value of 50px, causing cells in the same row to also expand accordingly. You can view an example on this Fiddle.
In my current setup:
grid-template-rows: repeat(4, minmax(50px, auto));
However, you'll notice that only the 3rd row grows while the 4th row remains unchanged. To fix this, I adjusted the line to:
grid-template-rows: repeat(4, minmax(50px, 1fr));
Yet, this causes all rows to increase evenly when there's overflow, which is not the desired outcome. For reference, check out this updated Fiddle.
Interestingly, when overflowing the 6th cell instead of the 4th, the 2nd and 3rd rows grow uniformly since the 6th cell spans both rows. This aligns with my expectations, as seen in this alternative scenario. However, I'm still puzzled by why the initial issue persists.
Could this be a bug? Observing the same behavior across Chrome and Firefox leads me to believe that I might be overlooking something rather than it being a technical glitch.