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

fixed navbar top gap #430

Merged
merged 1 commit into from
Nov 21, 2023
Merged

fixed navbar top gap #430

merged 1 commit into from
Nov 21, 2023

Conversation

yassine-safraoui
Copy link
Contributor

In your docusaurus config you're setting the hideOnScroll of the Navbar to false so that the navbar is sticky, and apperently there is a bug in docusaurus that makes a 1px gap apear on top of the navbar in this situation on some zoom levels( like 125% in my case), so when the user scrolls the content behind the navbar could be seen through that gap, like you can see in this picture:

Example

This behavior is well documented in this stackoverflow question: https://stackoverflow.com/questions/64729642/css-sticky-ignores-1px

The root of the problem is the combination of position sticky and top 0, the solution is to simply add a top of -1px to the navbar to compensate for the gap, it's the only thing I added as you can already see.

@vonPB vonPB merged commit 2b4d034 into LunarVim:master Nov 21, 2023
4 checks passed
@vonPB
Copy link
Member

vonPB commented Nov 21, 2023

sorry for being late, thank you!

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