[Feature Request] Revisit "CSS Grid Auto-Fill/Auto-Fit" Since JIT Compiler Released (Issue #1403) #8705
jvanderen1
started this conversation in
Ideas
Replies: 5 comments 5 replies
-
+1 It's a must for layout with grid |
Beta Was this translation helpful? Give feedback.
0 replies
-
+1, I also would love that feature as strong grid auto-fill user |
Beta Was this translation helpful? Give feedback.
0 replies
-
I put together a pull request for this feature #8812 🤞🏻 |
Beta Was this translation helpful? Give feedback.
2 replies
-
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.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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