I played a little with your code, is this what you need?
Mmh, i'm in a responsive environment, I can't use absolute widths, like 300px.
What if you change 300px to 100vw?
This works, but it's not a solution for me :( you changed the repeat() function with auto-fill, but I need 4 cols. For the moment I solved using flex instead of grid.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.