Describe the bug or issue
If there are only one or two items inside SectionGrid, the items expand to fill the entire available space because of auto-fit. I don't believe this is the desired effect, as if there is one item it is gigantic.
I updated my local SectionGrid to use auto-fill instead of auto-fit, and I believe this is a more desirable result.
// src/components/ui/section/section-grid.astro
const variants = cva("grid w-full gap-6", {
variants: {
frame: {
default: "",
},
size: {
sm: "grid-cols-[repeat(auto-fill,minmax(200px,1fr))]",
default: "grid-cols-1 sm:grid-cols-[repeat(auto-fill,minmax(260px,1fr))]",
lg: "grid-cols-1 sm:grid-cols-[repeat(auto-fill,minmax(400px,1fr))]",
xl: "grid-cols-1 sm:grid-cols-[repeat(auto-fill,minmax(600px,1fr))]",
},
},
defaultVariants: {
size: "default",
frame: "default",
},
});
This way, if there is one item, it won't grow to fit the entire available width; it will remain contained inside, not growing beyond the max size declared with minmax.
Happy to do a PR if this is agreeable.
Before (currently, with auto-fit):

After (with auto-fill):

For context, the layout with more items:

Describe the bug or issue
If there are only one or two items inside
SectionGrid, the items expand to fill the entire available space because ofauto-fit. I don't believe this is the desired effect, as if there is one item it is gigantic.I updated my local
SectionGridto useauto-fillinstead ofauto-fit, and I believe this is a more desirable result.This way, if there is one item, it won't grow to fit the entire available width; it will remain contained inside, not growing beyond the max size declared with
minmax.Happy to do a PR if this is agreeable.
Before (currently, with

auto-fit):After (with

auto-fill):For context, the layout with more items:
