startae / hagrid

:straight_ruler: Hagrid is a mixin library for responsive websites and web applications.
https://hagrid.netlify.com/
MIT License
30 stars 3 forks source link

Hagrid creating a horizontal scroll. Possible bug? #28

Closed renatocarvalho closed 9 years ago

renatocarvalho commented 9 years ago

Hey there @felics. I just faced something I have faced before and I'm not sure if it's a bug or if it's something I'm doing wrong.

Hagrid is creating a horizontal scroll when I don't have any margin on a container.

Screenshot of the horizontal scroll:

To create this, I removed the margin: 2em; from the body on the test.scss file to create this.

screen shot 2015-09-20 at 19 15 34
fspoettel commented 9 years ago

@renatocarvalho This is caused by using negative margins on the container element when nested directly under body without margins that are bigger than the grids' own negative margins. I think I fixed it though, will send a PR as soon as I'm done with testing.