Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Editor layout max-width

  • Hi,

    I’m developing two sites. Both have max-width set to var(–content-width) in the editor. One site has this set to 100% (testing with the latest RC versions of GP and GB), the other 880px – the latter forcing content to left align in the editor window.

    Where does this value var(–content-width) come from? I’m trying to make the editor look like the frontend (to a degree) for ease of use by my clients.

    Best wishes
    Andy

  • Hi Andy,

    It’s a calculated value based on the front end layout, it takes consideration of the sidebar layout, content container width, theme paddings/margins etc.

    – the latter forcing content to left align in the editor window.

    Do you mean when the -content-width is 880px, the content align to the left in the editor? it doesn’t sound right, the content should be centred if your editor width is more than the -content-width.

    If you can share the admin login we can help checking the editor.

    Let me know πŸ™‚

  • Yes it aligns to the left in both posts and pages. I’ll add admin login details below.

  • It seems your editor is missing this CSS from WP which causes the alignment issue in editor:

    .editor-styles-wrapper .wp-block {
        margin-left: auto;
        margin-right: auto;
    }

    Try to disable all cache or performance plugins, see if that fix the issue. If not, try disabling all plugins and switch to the parent theme to test.

    Let me know how it goes.

  • Thanks πŸ™‚ That fixes the issue!

  • Glad to hear that πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.