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

Think about making the desktop-navigation sticky #809

Open
LukasKalbertodt opened this issue May 8, 2023 · 0 comments
Open

Think about making the desktop-navigation sticky #809

LukasKalbertodt opened this issue May 8, 2023 · 0 comments
Labels
area:frontend Everything frontend related area:usability Usability related issues kind:improvement

Comments

@LukasKalbertodt
Copy link
Member

When scrolling down on a page, the desktop navigation is scrolled outside the viewport. Then there is just empty space on the left, which is unfortunate. One can fix that by making it sticky. For example, adding the following to this div:

position: sticky;
top: 24px;
align-self: flex-start;

Already results in this effect:

2023-05-08.14-28.Display.OC.Studio.webm

However, this fails when the navigation is higher than the viewport as then one is unable to ever scroll down to the last elements of the navigation. Of course we need to fix that. Ideally via CSS only. I think ideally the nav should continue to scroll with the page until the bottom part of the nav is visible. Then it should "stick" and stop scrolling. If one could access the height of self, one could do some calc(100vh - self-height ...) tricks, essentially setting a negative top. Not sure if it's possible.
There are JS libraries for that but yeah, one would have to see how to best solve this.

Also, assuming we can implement it as described: is this fine for accessibility? As the space is completely unused anyway, I don't think we have the typical "fixed element occluding main content" problem. But we should check of course.

@LukasKalbertodt LukasKalbertodt added area:frontend Everything frontend related kind:improvement area:usability Usability related issues labels May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:frontend Everything frontend related area:usability Usability related issues kind:improvement
Projects
None yet
Development

No branches or pull requests

1 participant