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(client): sticky header leaves 1px gap on top #11644

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OnkarRuikar
Copy link
Contributor

@OnkarRuikar OnkarRuikar commented Aug 17, 2024

Summary

Depending on the zoom level, the sticky-header-container leaves a 1px gap on the top.

Problem

Refer to the following video:

stiky_header_1px_gap.mp4

Note that the viewport's top border has white dots.

Make sure you have the dark theme on. If you can not reproduce it, change the browser zoom level slightly and scroll so that some text reaches the top border of the viewport. Keep changing zoom till you see the gap. I can reproduce this in Firefox and Chrome.

Solution

This is due to some zoom levels producing fractions in the header dimensions, so a 1px gap remains after rounding. Pulling the header 1px up by using top: -1px should cover the gap.


How did you test this change?

In a browser before and after the fix.

@OnkarRuikar OnkarRuikar requested a review from a team as a code owner August 17, 2024 06:32
@github-actions github-actions bot added the idle label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant