cobyism / gridism

A simple responsive CSS grid.
http://pages.cobyism.com/gridism
MIT License
660 stars 85 forks source link

How about this? #37

Closed mpa3b closed 6 years ago

mpa3b commented 8 years ago

If I use your grid unit'd content's widths aren't equal. I use this code to fix it:

`.grid { margin: 0 -10px; }

.unit:first-of-type { padding-left: 10px; }

.unit:last-of-type { padding-right: 10px; }

cobyism commented 8 years ago

Thanks for opening an issue. To make sure I understand the issue, are you able to link to a minimal example showing the problem? perhaps using a tool like JSFiddle or CodePen?

mpa3b commented 8 years ago

http://codepen.io/anon/pen/BjMNmq

cobyism commented 8 years ago

Thanks for creating that example. Yeah, the way this is designed is to ensure that the whitespace created by the gutters are equal on the outside and the inside:

2016-02-12 at 9 11 pm

Unfortunately, this does mean that the inside space of each .unit isn’t equal. If you want to ensure you have equal width units, it’s probably easier to just override like you have above, or create a dedicated component (perhaps using flexbox, since that now has fairly wide browser support, and gives you more control than frameworks like this that rely on floats etc.)

mpa3b commented 8 years ago

It's not aout the gutters, these are fine, but the images. The sample images are equal, same dimensions of 400px. But the display shows difference between them: 295, 305, 295