Skip to content

css: improvements to "move the left margin" #471

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

Merged
merged 3 commits into from
Dec 2, 2020
Merged

Conversation

felipec
Copy link
Contributor

@felipec felipec commented Dec 2, 2020

As @jnareb mentioned in issue #463, it should be possible to "move the left margin" so the navbar isn't squeezed.

However, conceptually what is actually being done is very different: the container wrapper is expanded to the full width of the window, then, the elements inside are justified to the center, this way the browser knows where to place the "left margin" (the left-most location where the navbar starts), but in order for the elements to not expand to the full width of the window, a max-width for the site container is necessary.

While on it, I adjusted the sizes of the navbar and the site containers, and removed some extra unnecessary padding.

Felipe Contreras added 3 commits December 1, 2020 18:56
This allows the wrapper to fit the whole width of the window, and align
the contained elements properly.

The width of the navbar is 20em (280px), so the max-width of the site is
940px - 280px, thus retaining the original width.

This fixes the issue with "Git Rev News: Edition 68" where the site width
was too big, and the navbar width got too small.

Signed-off-by: Felipe Contreras <[email protected]>
The site container is usually too small, and the navbar usually to big.

So adjust their widths.

Signed-off-by: Felipe Contreras <[email protected]>
The site and the navbar already have 2em between them, there's no need
to add another extra 2em.

This would be handled much better with a modern grid display.

Signed-off-by: Felipe Contreras <[email protected]>
@felipec
Copy link
Contributor Author

felipec commented Dec 2, 2020

This is what the changes look like on the 68th edition: css-margin.

@chriscool
Copy link
Collaborator

Ok, let's try this! Thanks @felipec !

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

Successfully merging this pull request may close these issues.

2 participants