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

This is a bad idea! #3

Closed
wendeavontuur opened this issue Sep 19, 2018 · 2 comments
Closed

This is a bad idea! #3

wendeavontuur opened this issue Sep 19, 2018 · 2 comments

Comments

@wendeavontuur
Copy link

wendeavontuur commented Sep 19, 2018

grid-gaps can't be wider than a single column!

If you have a nice gap-width of 10px and you still want to have for example a 2 column lay-out on mobile you're out of luck.
example A, your grid width is 960px (small desktop size):
width of a column (width gapwidth): 960 / 60 = 16;
width of column minus gapwidth: 16 - 10 = 6px;
60x6 + 60x10 = 960px
No problems here.

example B, your grid width is 360px (mobile size)
width of a column (width gapwidth): 360 / 60 = 6;
width of every column: 360/60 = 6px;
width of column minus gapwidth: 6 - 10 = -4px;

oops!

This is what happens:
the column can't be negative so it's set to 0px, so the total width of the grid now is:
60x0 + 60x10 = 600px

@vladocar
Copy link
Owner

Yes it's true. That is why I have @media (max-width: 600px) .. The purpose of this project was to test the limits of the grid layout and offer alternative solutions.

@wendeavontuur
Copy link
Author

maybe add something about this in your (very funny) description?
Because I just found out in the middle of a project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants