Home > Enterprise >  Grid Template Column issue on Tailwind
Grid Template Column issue on Tailwind

Time:12-16

I'd like to have the same efect as in the auto-fill effect in the following link:

grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));

https://codepen.io/SaraSoueidan/pen/JrLdBQ

I tried the following, but it is not working

grid grid-cols-[auto-fill_minmax(100px,_1fr)]

What I am doing wrong?

CodePudding user response:

You have to include the repeat part, like this: grid-cols-[repeat(auto-fill,_minmax(100px,_1fr))]

Here is a working example: https://play.tailwindcss.com/HzSYGTAji7

  • Related