Skip to content
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

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Jul 27, 2021

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

Before After
image image

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.)

@lex111 lex111 added the pr: bug fix This PR fixes a bug in a past release. label Jul 27, 2021
@lex111 lex111 requested a review from slorber as a code owner July 27, 2021 23:56
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 27, 2021
@@ -21,7 +21,6 @@ export default function TOCCollapsible({toc, className}: TOCCollapsibleProps) {
return (
<div
className={clsx(
'margin-vert--md',
Copy link
Contributor Author

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.

@netlify
Copy link

netlify bot commented Jul 28, 2021

✔️ [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

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 72
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5230--docusaurus-2.netlify.app/

@github-actions
Copy link

Size Change: +20 B (0%)

Total Size: 859 kB

Filename Size Change
website/build/assets/css/styles.********.css 92.8 kB +58 B (0%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 59.2 kB 0 B
website/build/assets/js/main.********.js 463 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 62.4 kB 0 B
website/build/blog/index.html 26.4 kB 0 B
website/build/docs/index.html 40.3 kB -19 B (0%)
website/build/docs/installation/index.html 47.9 kB -19 B (0%)
website/build/index.html 27.3 kB 0 B
website/build/tests/docs/index.html 20.9 kB 0 B
website/build/tests/docs/standalone/index.html 18.8 kB 0 B

compressed-size-action

@slorber
Copy link
Collaborator

slorber commented Jul 28, 2021

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

@slorber slorber merged commit ce847d6 into master Jul 28, 2021
@lex111
Copy link
Contributor Author

lex111 commented Jul 28, 2021

But I just try to keep all these margins the same, think design consistency is important.

image

image

image

@lex111 lex111 deleted the lex111/toc-mobile-margin branch July 28, 2021 15:24
@slorber
Copy link
Collaborator

slorber commented Jul 28, 2021

Agree to make things consistent. It's just prefer to have more spacing, also in a consistent way of course :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants