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
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

1 participant