[Feature Request] Revisit "CSS Grid Auto-Fill/Auto-Fit" Since JIT Compiler Released (Issue #1403) #8705
Replies: 6 comments 5 replies
-
very good |
Beta Was this translation helpful? Give feedback.
-
+1 It's a must for layout with grid |
Beta Was this translation helpful? Give feedback.
-
+1, I also would love that feature as strong grid auto-fill user |
Beta Was this translation helpful? Give feedback.
-
I put together a pull request for this feature #8812 🤞🏻 |
Beta Was this translation helpful? Give feedback.
-
This works for me. Modify as needed 🙂 extend: {
gridTemplateColumns: (theme) => {
const spacing = theme("spacing");
return Object.keys(spacing).reduce((accumulator, spacingKey) => {
return {
...accumulator,
[`fill-${spacingKey}`]: `repeat(auto-fill, minmax(${spacing[spacingKey]}, 1fr))`,
};
}, {});
},
}, |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Feel free to close this issue if it really is something we will not reconsider doing for TailwindCSS 🙏🏻 . I figured it would be worth one last push for #1403 since the new JIT compiler has been released.
Example Syntax
@Yoda-Soda gave a great suggestion for sensible values for
auto-fill
andauto-fit
. Although I have mainly seen these property values used forgrid-template-columns
, it may be better to specify separate classes forgrid-template-rows
andgrid-template-columns
:grid-rows-fill-16
grid-template-rows: repeat(auto-fill, minmax(4rem, 1fr))
grid-cols-fill-20
grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr))
grid-rows-fit-24
grid-template-rows: repeat(auto-fit, minmax(6rem, 1fr))
grid-cols-fit-28
grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr))
Thanks for developing such a wonderful tool! I advocate for it at work all the time ⭐ .
Beta Was this translation helpful? Give feedback.
All reactions