-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
refactor(v2): reduce vertical space in doc content container #4877
Conversation
✔️ [V1] 🔨 Explore the source changes: 757a065 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-1/deploys/60b9c8d48ff56d000889f203 😎 Browse the preview: https://deploy-preview-4877--docusaurus-1.netlify.app |
✔️ [V2] 🔨 Explore the source changes: 757a065 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60b9c8d4f60fbc0008679b10 😎 Browse the preview: https://deploy-preview-4877--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4877--docusaurus-2.netlify.app/ |
Size Change: +1.16 kB (0%) Total Size: 621 kB
ℹ️ View Unchanged
|
Not sure to understand why but I see also a difference in the width of the container (using a large 27" screen): Before: After: Not a big deal imho, just wanted to highlight a potentially unwanted side-effect (due to margin collapsing maybe?) Apart that, I'm not too fan of this change, I prefer to keep the additional top margin, but it's probably a matter of taste. @yangshun any opinion? |
I'm totally ok to align content on a vertical line, but it just feels weird that the content, sidebar and toc are so close to the navbar. I feel this PR removes some spacing that may be important. V1 and MkDocs both have more spacing: However not sure how to add this spacing considering v2 sidebar implementation. Let's merge this for now but we can see later if there's a way to improve. |
Yes I think we can remove a duplicate padding, one is enough |
@slorber I share your preference for the top alignment and was able to achieve the desired effect with additional top padding on |
Motivation
At the moment, doc content is positioned bit lower compared to doc sidebar content, this inconsistency in these two columns is a bit disturbing to the eye. If you look at the blog layout, there is no such issue, so I suggest eliminating this visual discrepancy.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Before:
After:
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)