-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
fix(v2): remove top margin from first element inside doc article #5230
Conversation
@@ -21,7 +21,6 @@ export default function TOCCollapsible({toc, className}: TOCCollapsibleProps) { | |||
return ( | |||
<div | |||
className={clsx( | |||
'margin-vert--md', |
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.
Intentionally removing this utility class because it uses important
rule, and I just want to avoid using important
rule to overriding values in our stylesheet if possible.
✔️ [V2] 🔨 Explore the source changes: 9565998 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61009d1a8e9e7b00072b1c27 😎 Browse the preview: https://deploy-preview-5230--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5230--docusaurus-2.netlify.app/ |
Size Change: +20 B (0%) Total Size: 859 kB
ℹ️ View Unchanged
|
Merging, but this is quite opinionated. Personally I like the first version more and I think we tend to disagree on design regarding spacing of elements 😅 Next time I suggest we do a community poll for such changes to be sure most agree on it |
Agree to make things consistent. It's just prefer to have more spacing, also in a consistent way of course :) |
Motivation
For example, if site does not use versioning, mobile TOC will be the first element in doc article section, and adding large and unnecessary margin at the top. I suggest removing top margin from first element inside article element as should be by design.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
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.)