-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Zoom out: wide blocks are shrunken #63519
Comments
So far I’ve only reproduced this for cover blocks (wide aligned or not) and it looks like it has to do with the styles introduced in #59512. I say that because in the browser, when disabling |
I may have spoken too soon about this, sorry :) The issue with the Jetpack block may be unrelated. I'm still looking into what's happening and will update this ticket when I know more. |
My confusion stemmed from a difference between the post and site editors. I'm still not completely sure what's going on, but I think it's the following. In the zoomed out mode of the post editor, there is no In zoomed out mode of the site editor, there is a Perhaps we can ditch the left/right border rule to prevent the layout change? |
Just for clarity, you're suggesting that the border effect is what's causing the problem? |
Also, how do I reproduce this exactly? I'm not seeing the wide cover block on the Gutenberg demo page have this issue: CleanShot.2024-08-05.at.10.29.41.mp4 |
No. The "expand main content area" effect seems to be the cause #63519 (comment). I can still reproduce this with Twenty Twenty-Four in the Post editor on a post—not a page—with the following markup: <!-- wp:cover {"dimRatio":50,"isUserOverlayColor":true,"isDark":false,"align":"wide","className":"is-light"} -->
<div class="wp-block-cover alignwide is-light"><span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","textColor":"white","fontSize":"large"} -->
<p class="has-text-align-center has-white-color has-text-color has-large-font-size">Of Mountains & Printing Presses</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover -->
<!-- wp:group {"align":"wide","style":{"color":{"background":"#d9edcb"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide has-background" style="background-color:#d9edcb"><!-- wp:paragraph -->
<p>p in widealign group</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --> Why this happens on posts and not pages seems to be that the Post content block ( gutenberg/packages/editor/src/components/visual-editor/index.js Lines 325 to 329 in 650eb7f
|
Yea, you're right. |
Yes, the border is part of the scaling issue but not part of what this issue is originally about—that some blocks are changing their width relative to others when zoom out is engaged. |
That's exactly what I'm seeing :) Though if it's better to consider the border issue as a separate, that's cool by me. |
@stokesman @mdawaffe is this issue still occurring? |
@richtabor yes. |
Hey 👋, Here are some of my observations:
One solution that seems to fix the issue is to simply remove
Here’s the zoom out view after removing:
Note: I did remove and test the border rule (#63519 (comment)) but that doesn't seem to fix this issue.
|
Howdy @AhmarZaidi can you open a PR so we can test it out and see what other consequences the edits to the styling of the root container have? |
@ellatrix @stokesman @mdawaffe is this still something you can repro on |
Yes, but only in the Post editor on a post (not a page). It seems the theme can make a difference. TT4 is what I was testing with. Adding other blocks/content can make the issue less pronounced or entirely unseen (depending on window width). You can see the issue with the following markup: <!-- wp:cover {"dimRatio":50,"isUserOverlayColor":true,"isDark":false,"align":"full","className":"is-light"} -->
<div class="wp-block-cover alignfull is-light"><span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","textColor":"white","fontSize":"large"} -->
<p class="has-text-align-center has-white-color has-text-color has-large-font-size">Of Mountains & Printing Presses</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover -->
<!-- wp:group {"align":"wide","style":{"color":{"background":"#d9edcb"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide has-background" style="background-color:#d9edcb"><!-- wp:paragraph -->
<p>p in widealign group</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --> And add this markup to avoid the issue from being present (unless your window is very wide): <!-- wp:group {"align":"wide","className":"wporg-gutenberg-block-layout","layout":{"contentSize":"1150px","type":"constrained"}} -->
<div class="wp-block-group alignwide wporg-gutenberg-block-layout"><!-- wp:paragraph {"fontSize":"medium"} -->
<p class="has-medium-font-size">Blocks allow you to build your own custom posts and pages without any coding knowledge. Here’s a selection of the default blocks included with Gutenberg:</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --> |
Yes, the issue I have still happens in current trunk. Note that it has a similar symptom as the issue described above by @stokesman but comes from a distinct source. (See #63519 (comment) and earlier.)
If all we were doing was I haven't been following any of the more recent discussion about this (and similar issues). Apologies if there's another thread out there with a better understanding than mine in this one :) |
@mdawaffe, as far as I can tell this issue has nothing to do with the scaling and border. Those are indeed problems and #65814 is aimed specifically at those. I do appreciate your attention to detail and good explanation of what’s going on with the border and scaling 👍. As best I can see, this issue is due to |
Not sure if it's the same issue, but it seems pretty easy to reproduce this using Twenty Twenty Five, just by adding a single paragraph to a post: Kapture.2024-10-11.at.16.06.36.mp4I concur with what @stokesman says, the flex rule is the issue. #66041 is also resolving the issue for me. |
#66041 was merged, and I can't reproduce this issue on trunk anymore, so closing this one. |
Description
Step-by-step reproduction instructions
Open a pattern category from the inserter with the demo content
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: