-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 extraneous scrollbar in device previews #66494
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -20 B (0%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
Flaky tests detected in 3fce8eb. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11528084507
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for testing and reviewing Aki! |
Co-authored-by: stokesman <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: colorful-tones <[email protected]> Co-authored-by: dhruvang21 <[email protected]>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: 88c51c7 |
Co-authored-by: stokesman <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: colorful-tones <[email protected]> Co-authored-by: dhruvang21 <[email protected]>
What?
A style revision to fix #66156
Why?
We don’t need a third scrolling area.
How?
Removes
overflow-x: hidden;
fromIframe
’s__container
element. This prevents a BFC being formed becauseoverflow-y
implicitly becomesauto
. That was causing the element to contain the vertical margins that are added to the iframe in device previews. Those margins plus the100%
height of the child seems to be the what creates the overflow.More notes
Changing the
overflow-x: hidden
tooverflow: hidden
also seems to work but also seems unnecessary. Theoverflow-x: hidden
rule originated in #61424 and perhaps was necessary then yet now it seems to have no purpose.Testing Instructions
General tip: make sure your OS is set to always show scrollbars as it makes these types of issues easier to spot.
Device Previews and zoom out
No regression of #65977
1- Run storybook locally npm run storybook:dev
2- Open the playground box story
3- Notice that the height of the canvas is set to 500px, there's no extra border for the iframe and that the width of the canvas is 100%
Screenshots or screencast
fixed-device-preview-extra-scroll-area.mp4