Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make negative margins on rows the default, not just in containers, an…
…d add padding to body to compensate
- Loading branch information
Showing
4 changed files
with
17 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e4bb388
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be wrong, but this seemingly causes tablet sizes and below to suffer wide, blank margins on either side of the content when using a static navbar & static footer. Hard to show against GitHub's white background, but note that the black footer should (and was, before this commit) full-width. The navbar (not shown) is similarly affected.
I can fix this with the below, but it seems a clunky solution.
If you want this moved into an issue, let me know and I'll do so.
e4bb388
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a similar issue.
On my site, I use wrapper divs around the containers so that I have have colored sections that go side to side, so it looks like
In this case, the header could be a solid color, red, and then the container and such inside of it behaves normally. With this commit, the body has the 15px padding, so the content inside the .container acts the same, but my header that used to span the whole browser now hits the body padding.
This is mitigated by using
Which returns it to the same state it was before the body had the padding. Like elithrar above, I am not sure if this is an issue, but for "wrappers" that don't have a width or margin set to them, they need that -15px side margins to touch the "edges" of the browser, and then some sort of inner padding to keep content from touching the edges as well, which it didn't need before since the rows had the margins to keep everything away from the edges.
You can see my development site I update each day with the new commits to see what happens, the neon green squares show the body padding pushing in the wrappers. The red and gray wrappers would touch the edges before. The negative margin fixes it, but I am not sure if that's how you want people using full width wrappers. If it's an issue, I can file it there as well.
e4bb388
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like @mdo fixed this in cd0df1d — he removed the
body
padding and added it to thecontainer
.I've removed my quick hacks—
body { padding-left: 0; padding-right: 0; }
—and it seems that full width containers function as they should now.(thanks again @mdo for the quick fix!)