Skip to content

Add scroll padding for anchor links on mobile #219

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 1 commit into from
Aug 6, 2023

Conversation

p8
Copy link
Member

@p8 p8 commented Apr 21, 2023

As the menu bar is fixed on mobile and overlaps the content we need to add scroll padding for the anchor links to be visible.

Source: https://stackoverflow.com/a/56467997

@zzak
Copy link
Member

zzak commented Apr 26, 2023

I cannot tell the difference, am I missing something here?

Screenshot 2023-04-27 at 6 58 03

@p8 p8 force-pushed the fix/mobile-anchor-links branch from 5c20fbd to 8046c7e Compare April 27, 2023 07:24
@p8
Copy link
Member Author

p8 commented Apr 27, 2023

When you open the following anchor link on mobile you currently don't see the save(**options), as it is hidden under the top bar.
https://edgeapi.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-save

image

With this PR you see the save(**options)
https://deploy-preview-219--sdoc.netlify.app/classes/activerecord/persistence#method-i-save
image

As the menu bar is fixed and overlaps the content we need to add scroll
padding for the links to be visible.
@p8 p8 force-pushed the fix/mobile-anchor-links branch from 8046c7e to 1f3c153 Compare August 6, 2023 13:20
@p8 p8 merged commit d77123f into rails:main Aug 6, 2023
@p8 p8 deleted the fix/mobile-anchor-links branch August 6, 2023 13:52
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