Skip to content

fix(mobile): prevent margin-top misalignment in Jump to links on mobile - #1555

Open
waterWang wants to merge 1 commit into
processing:mainfrom
waterWang:fix/mobile-jumpto-alignment
Open

fix(mobile): prevent margin-top misalignment in Jump to links on mobile#1555
waterWang wants to merge 1 commit into
processing:mainfrom
waterWang:fix/mobile-jumpto-alignment

Conversation

@waterWang

Copy link
Copy Markdown

Description

On mobile, the Jump to links section in the reference pages uses a two-column grid layout. The rule .jumpto ul li.linklabel:not(:global(.small), :first-child) { margin-top: 10px; } was causing second-column items to be pushed down, creating visual misalignment.

Fix

Wrapped the margin-top: 10px rule in a desktop-only media query (@media (min-width: variables.$breakpoint-tablet)) so it only applies on tablet+ screens where the inline-block layout needs vertical spacing. On mobile, the grid layout handles spacing automatically.

Before/After

See screenshots in the issue: #1554

Fixes #1554

On mobile, the Jump to links section uses a two-column grid layout.
The margin-top: 10px on :not(first-child) link labels was causing
second-column items to be pushed down, creating visual misalignment.

Wrap the margin-top rule in a desktop-only media query so it only
applies on tablet+ where the inline-block layout needs vertical spacing.

Fixes processing#1554
@doradocodes

Copy link
Copy Markdown
Contributor

Hi @waterWang, after debugging further into this issue, I think that the CSS to add the margin-top: 10px should be removed altogether, so that the desktop and mobile menus have tighter spacing between the menu items. The expected layout should look like this for the menus:

Desktop:
Jump To

Mobile:
Screenshot 2026-08-11 at 12 16 05 PM

Separately, I noticed that the mobile menus for the Examples and Tutorial pages have long titles, so the menu looks squished, for example:
Screenshot 2026-08-11 at 12 13 15 PM
Screenshot 2026-08-11 at 12 13 01 PM

Therefore, I think the menus for the Examples and Tutorial pages should have 1 column instead. I think that can be fixed in this PR, so please let us know if you'd like to work on that!

@aarjav-shukla

Copy link
Copy Markdown

Hi,i just wanna know that is this issue about the unalligned items in Examples and Tutorials page still open ? if so i would like to work on this @doradocodes

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.

[Mobile] The links under "Jump to" are misaligned from unnecessary margins

3 participants