The Wayback Machine - https://web.archive.org/web/20200821210016/https://github.com/reactjs/reactjs.org/issues/3113
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

Anchors are hidden underneath the navbar when navigating to them #3113

Open
claudiopro opened this issue Jul 16, 2020 · 5 comments · May be fixed by #3141
Open

Anchors are hidden underneath the navbar when navigating to them #3113

claudiopro opened this issue Jul 16, 2020 · 5 comments · May be fixed by #3141

Comments

@claudiopro
Copy link

@claudiopro claudiopro commented Jul 16, 2020

I noticed that anchor links slide under the navbar. This is similar to facebook/docusaurus#2907 and likely caused by the increase of the height of the navbar caused by the BLM banner.

Steps to reproduce

  1. Create an anchor and a link to the anchor in React docs
  2. Publish the website
  3. Tap the anchor link

Expected result

The anchor appears in view at the top of the page

Actual result

The anchor appears at the top of the page hidden under the navbar

Screen Shot 2020-07-16 at 9 39 25 PM

@claudiopro
Copy link
Author

@claudiopro claudiopro commented Jul 16, 2020

The padding of anchors appears to be set in the Gatsby theme here:

https://github.com/reactjs/reactjs.org/blob/master/src/theme.js#L286-L292

@rickhanlonii
Copy link
Collaborator

@rickhanlonii rickhanlonii commented Jul 19, 2020

Confirmed, thanks for filing this @claudiopro. Do you want to submit a PR to fix it?

@harshilparmar
Copy link

@harshilparmar harshilparmar commented Jul 23, 2020

@rickhanlonii @claudiopro Can I try this?

@rickhanlonii
Copy link
Collaborator

@rickhanlonii rickhanlonii commented Jul 26, 2020

@harshilparmar yeah! Let me know if you need any help getting set up.

@kwaimind kwaimind linked a pull request that will close this issue Jul 27, 2020
@kwaimind
Copy link

@kwaimind kwaimind commented Jul 27, 2020

Hey, I hope it's ok but I took the liberty of looking into this issue and made a PR with a potential fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.