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

Disabling 'Inner blocks use content width' on content block removes max-width on edit page #69051

Open
3 of 6 tasks
kkettinger opened this issue Feb 5, 2025 · 1 comment
Open
3 of 6 tasks
Labels
[Type] Bug An existing feature does not function as intended

Comments

@kkettinger
Copy link

Description

Disabling the the option Inner blocks use content width in the content block of the single post template results in missing width for content when editing a post, making it harder to write content.

Step-by-step reproduction instructions

  1. Edit the 'Single Post' template
  2. Select the content block in the list view
  3. Disable Inner blocks use content width
  4. Edit a blog post

Screenshots, screen recording, code snippet

In my template i disabled the option Inner blocks use content width for the content block, because i that's how i want it in my theme:
Image
Image

When i now editing a post, it seems it applies the block settings on the post page too, resulting in max-width: none for the content elements. The content elements now expand to fill the full width of the browser page:
Image

When i enable the Inner blocks use content width option again, the max-width argument on the elements is back:
Image

Environment info

  • Wordpress Version 6.7.1
  • Theme twenty-twenty-five

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@kkettinger kkettinger added the [Type] Bug An existing feature does not function as intended label Feb 5, 2025
@yogeshbhutkar
Copy link
Contributor

When i now editing a post, it seems it applies the block settings on the post page too, resulting in max-width: none for the content elements.

This appears intentional—the layout properties applied to the content also affect the post body within the editor.

In the first shared image, the content extends to the sides. However, in the editor, the has-global-padding class typically applies global padding, so it shouldn't be stretching all the way to the edges like that.

I tested the same behavior in Twenty Twenty-Five, and here’s how it looks for me:

Image
Caption: Inner blocks use content width is set to false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants