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 #1759: Hovering over an icon can trigger the scroll bar #1767

Merged

Conversation

hwoongkang
Copy link
Contributor

@hwoongkang hwoongkang commented Nov 7, 2024

As @justvanrossum said: #1759 (comment), animating the svg inside the icon-button is indeed a good solution.

I changed the animating DOM object from the button itself to the svg inside the button.

I also added will-change: transform to the svg, in order to not to repeat the issue #1388.

Changing the animating object only didn't work in Windows. I added contain: content to the button, to indicate that the transform of its content should not affect the layout: https://developer.mozilla.org/en-US/docs/Web/CSS/contain

This fixes #1759

@justvanrossum
Copy link
Collaborator

Thank you so much! Will review and test soon.

Copy link
Collaborator

@justvanrossum justvanrossum left a comment

Choose a reason for hiding this comment

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

I tested on Windows: I managed to reproduce the original report and can confirm that your fix is working. Thank you so much!

@justvanrossum justvanrossum merged commit 5d707b5 into googlefonts:main Nov 7, 2024
5 checks passed
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.

Hovering over an icon can trigger the scroll bar
2 participants