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

Jump to anchor results in scrolling on overflow: hidden #32685

Merged
merged 4 commits into from
Mar 18, 2024
Merged

Conversation

rr-it
Copy link
Contributor

@rr-it rr-it commented Mar 14, 2024

Description

Jumping to an anchor via link or URL is the programmatic action which triggers scrolling on overflow: hidden.

Motivation

Ever wonder why your overflow: hidden jumps around? Better use overflow: clip.

Additional details

https://developer.mozilla.org/en-US/docs/Web/CSS/overflow

Related issues and pull requests

Jumping to an anchor via link or URL is _the_ programmatic action which triggers scrolling on `overflow: hidden`.
@rr-it rr-it requested a review from a team as a code owner March 14, 2024 16:08
@rr-it rr-it requested review from estelle and removed request for a team March 14, 2024 16:08
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels Mar 14, 2024
Copy link
Contributor

github-actions bot commented Mar 14, 2024

Preview URLs

(comment last updated: 2024-03-18 15:31:34)

rr-it and others added 2 commits March 15, 2024 11:44
@rr-it
Copy link
Contributor Author

rr-it commented Mar 15, 2024

See test-case: https://jsfiddle.net/p32fehvk/

Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Also, congratulations on your first merged MDN content PR. Welcome to the team!

@estelle estelle merged commit b90cf5d into mdn:main Mar 18, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants