inside grid layout width set 100% but getting out of grid code example
Example: css grid no stretch
.foo {
display: grid;
grid-template-columns: auto minmax(0,1fr);
}
.foo {
display: grid;
grid-template-columns: auto minmax(0,1fr);
}