-
Notifications
You must be signed in to change notification settings - Fork 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
Site Editor: block list width looks off #43640
Comments
This actually looks like a core issue so we might transfer the discussion there. |
Yeah, I think I can repro the same in Core when testing with the I think this probably is a default that comes from the post editor, and needs some tweaking for the site editor, where we want the full width by default. |
I think that this is coming from the theme. In the case of seedlets, I think it's max-width: var(--responsive--aligndefault-width); in That rule can be overridden with |
In a post content editor context, the Cover Block has |
To be precise, it's not the Cover Block itself, but a wrapping |
For the Site Editor, we want to allow post content to be inserted at full width (e.g. Cover Blocks). This is currently impossible (see Automattic/wp-calypso#43640) due to two independent problems. This PR fixes them. 1. [Unlike the Post Editor](https://github.com/WordPress/WordPress/blob/f18870ae4e1cb3cd81136424e43c99d705aa2912/wp-admin/edit-form-blocks.php#L286), we're currently not setting `alignWide` in the Site Editor's settings, which becomes a problem here: https://github.com/WordPress/gutenberg/blob/9cd07a92d463377767f56c2b3985badbd363d98f/packages/block-editor/src/hooks/align.js#L173-L196. 2. In order to specifically make the Post Content block full-width, we need to add `align` to its `supports` attribute. (It's still conceivable to use this block at other widths, e.g. in a setting with a sidebar.) Finally, there remained a 10px padding even after applying these changes. This was fixed by removing block list padding from the Site Editor (a change that had previously been applied to the Post Editor in #22213).
When testing the site editor on Dotcom, I noticed that the block list container is not using full width.
This makes the page layouts that contain full width blocks look off compared to what's shown in Gutenboarding preview and on front end.
The text was updated successfully, but these errors were encountered: