-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
I'm trying to create a grid layout using display: grid, but I noticed that when the items are rendered, the first and last child elements of the grid appear empty due to the placeholder divs generated by the Virtualize component.
I attempted to fix this issue with the following CSS:
.ns-container-product > div:first-child,
.ns-container-product > div:last-child {
min-height: 0;
padding: 0;
margin: 0;
border: none;
grid-column: 1 / -1;
}
However, this solution creates a full empty row, which sometimes results in unwanted blank space.
I also tried using display: contents;, but in that case, the items are not rendered the first time the component loads.
As an alternative, I switched to using flex-wrap: wrap, but this causes a noticeable flicker when scrolling.
It seems that this behavior might be related to the following issue: dotnet/aspnetcore#39468.
I've attached a sample project where the problem can be reproduced, along with a video showing the flicker effect.