Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid items overflow #33

Closed
guybendavid opened this issue Sep 27, 2021 · 1 comment
Closed

grid items overflow #33

guybendavid opened this issue Sep 27, 2021 · 1 comment
Labels
question Further information is requested

Comments

@guybendavid
Copy link

guybendavid commented Sep 27, 2021

Using a large number of grid items is causing the behavior presented in the image:

image

@lucaslarroche
Copy link
Member

Hi @guybendavid,

I don't see a bug here.
This seems to be the expected behavior of CSS grid in browsers.

What behavior should it have?
Pico could force a wrap. But it is highly dependent on the content and layout of the site.

This problem is typically a case where developers need to adapt Pico's CSS code.
I don't think it's good that Pico sets a minimum width value for items.

In your case, you could do something like that:

.grid {
  --grid-min-value: 4rem;
  grid-template-columns: repeat(auto-fit, minmax(var(--grid-min-value), 1fr));
}

@lucaslarroche lucaslarroche added the question Further information is requested label Oct 24, 2021
@lucaslarroche lucaslarroche linked a pull request Oct 24, 2021 that will close this issue
@lucaslarroche lucaslarroche removed a link to a pull request Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants