Editor Max. Width setting for Post Content block not applying

Description:

Setting Editor Max. Width on the Post Content block is not having any effect.

Step-by-step reproduction instructions:

  1. Add a Single Post template
  2. Add a Post Content block to it
  3. Set the Editor Max. Width property (e.g. 30rem)
  4. Set the visibility conditions for the Single Post template to Show If > Singular > Posts > All
  5. Create a Post
  6. Note that the Editor width is the full available width

Screenshots, screen recording, code snippet

Environment info

  • WordPress version: 6.4.3
  • Cwicly Plugin version: 1.4.0.1

Hi @StrangeTech,

Thank you for taking the time to report this!

I have been able to reproduce this issue on my end, and can confirm it is a bug.
We’ll be sure to have a fix for this as soon as possible.

Apologies for the inonvenience.

@Louis Just following up on this, as it is a client facing issue and affects the client’s editing experience it will be good to solve this when possible. Thanks.

Hi @StrangeTech,

I use a dedicated class on post content blocks, like .editor-wrapper-style, so that I can have more freedom on this.

Indeed, on frontend, my content blocks may have some padding or not, depending on templates, different width, background, etc. And I don’t want to systematically apply everything on backend.
This is especially important with padding, since most of the time my post content is nested inside a bigger wrapper (main or section) with padding, so my post content doesn’t have padding, but on the contrary I need it in the editor to prevent content from reaching the edges.

My usual CSS for a single post content:

.is-root-container.wp-block-post-content.editor-wrapper-style {
    margin: 0 auto;
    padding: var(--p-section-y) var(--p-section-x);
}
1 Like

Thanks @yankiara,

We were doing something similar before this setting was introduced and have had to put it back in place in the meantime, it is just unfortunate because with different sites being on different versions, as soon as you upgrade, you have to keep track of which site has the workaround and which doesn’t. We were hoping this would be fixed, so we wouldn’t have to add the workaround to the other sites.

I think perhaps I will go with custom code approach to save time. :+1:

1 Like

For anyone using the Force Iframe feature, here is the equivalent Admin CSS:

.block-editor-iframe__body.editor-styles-wrapper .wp-block-post-content {
    padding: 2rem 2rem;
}

Hello @StrangeTech,

Can you let me know what your current breakpoint setup is? I think this might be affecting the max width setting if set with Tailwind breakpoints.

Cheers,

@Louis, We have many sites, some with tailwind, some without, of the two that I have recently tested and replicated this on, both have mobile first breakpoints (as per Tailwind reset), one is actively using Tailwind, the other is not.