Skip to content

Conversation

@williamsaether
Copy link

@williamsaether williamsaether commented Nov 13, 2025

Description

This PR fixes an issue where the menu toggle (hamburger to close icon) becomes misaligned or barely visible when opening the menu after scrolling. Since the header is not sticky, the toggle keeps its old position relative to the scrolled header, causing the close icon to appear almost off-screen or out of alignment with the search field.

This change adjusts the positioning so that when the menu is opened, the toggle correctly aligns with the fixed header/search field layout, regardless of scroll position. Only minimal CSS adjustments were made to existing elements.

If this behaviour was intentional or part of the design, feel free to reject the PR, I simply assumed it was an unintended UX side effect.

Label: bug-fix

Result

  • Changes look good on both light and dark theme.
  • Changes look good with different viewports (desktop, tablet, mobile).
  • Changes look good with slower Internet connections.

Note: No user data is included in the screenshots.

Description Before After
Menu toggle does not reposition when the menu is opened after scrolling, causing the close icon to appear misaligned or almost off-screen. image image

Testing

  • I have thoroughly tested my changes.

Testing procedure:

  1. Scroll the page so that the header is partially out of view.
  2. Open the menu using the toggle.
  3. Observe that in the previous behaviour, the close icon appears in the old scroll position.
  4. With this fix applied, the toggle properly aligns with the fixed header/search field.
  5. Verified across multiple viewports, themes, and with throttled network.

Resolves webkom/lego#3866

This resolves an issue where the mobile menu toggle becomes hard to see when the header is partially scrolled. Because the header is not sticky, the toggle would remain in its old position and appear almost off-screen when opening the menu.

The change ensures the toggle aligns with the fixed search field when the menu is open. This improves visibility and overall usability.
@ch0rizo
Copy link
Contributor

ch0rizo commented Jan 14, 2026

Very nice! This has bothered me for a long time. We will make sure to implement this, thanks for contributing!

@Viljen789
Copy link
Contributor

Awesome! Really nice fix, looks really good!

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.

Menu toggle becomes misaligned or barely visible when opening the menu after scrolling

3 participants