-
Trenbania
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 π
-
Trenbania
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.
-
Trenbania
Thanks π That fixes the issue!
-
Glad to hear that π
- You must be logged in to reply to this topic.