Boxed content for templated post-types editing

I know I could probably hack my way in doing that simply with css such as this (provided I target parent post-type):
.edit-post-visual-editor {
width: 1120px; // or any other value OR the var of section default width
margin-right: auto;
margin-left: auto;
// or just padding left right at least.
}
I think Louis mentioned that we’re waiting for a merge of Gutenberg in 2023 that could solve this (I don’t know about this).

Still if doable as an option to just select the post type (post or CPT), this would help my clients or me, to have an better editing experience than full width and no padding.

Has anyone found a solution?

Hi @AnthonyKeller,

I think this was already brought up here as a feature request and was introduced with 1.2.8.1

Let me know if this helps out!

1 Like

Maybe you are able find find some value here as well @AnthonyKeller.

2 Likes

Thank you for suggestions.
Bit lost here… I found that Cwicly uses a max-width of 1440px and centers horizontally with a margin:0.
If I get my screen down, it is still sticking to edges below 1440px.

I found the other issue.
If NOT through themer (I use singular post type post or page with “all”) then both post and page will have the 1440px limit which I guess is good. Not so good to me but I don’t know what others think. I mostly complain about side paddings as I don’t like stuff sticking to the edges.
If I use themer for page, then there is no limit (no boxed) and same for post respectively.
So this 1440px fix works when not templated through themer as I mentioned in the title.

I will reference this on the other thread mentioned by Araminta as Louis asked there for any input.

Hi there @AnthonyKeller,

The 1440px max-width would be set by the Section block or on the Post Content block itself. There is no property applied by Cwicly by default.
If you don’t place your Post Content block inside a Section block, it won’t have the Section properties applied to it.

In the end, the backend Post Editor tries to take into account the Post Content block parent properties as well as its own properties. If you apply max-width: 700px; and padding: 20px; to the Post Content block, it will be shown throughout the Post Editor.

Thank you!
I guess I want to keep my section inside the template so that I can give it a tag of “main” or something templated.
I also wish to edit straight into the editor so your last paragraph helped.
What I did was, in my template (from themer), to give a max width 20px more than needed (1140px if need 1120px) with padding both sides 10px and the post content set to display:block with margin left and right set as “auto”.
Works just fine.

Hi,

I also found out that 1440px width was applied (as a UI setting, not some default CSS) to root content section in all templates I created (single post, archive, front page, etc.):

image

And since it’s a UI setting, it overrides the width content defined in global style (the 1120px default).

Is this some relics from the past?
This should be removed from all newly created templates, or maybe I’m missing some setting somewhere?

Hi @yankiara,

The Cwicly theme does have this value applied to its Index template, although this won’t affect other templates unless you create default templates (from the Site Editor) using the same Index template. The property is indeed inherited from past defaults.

I’m always one for removing all blocks before starting afresh, so this asn’t brought to my attention up until now, thank you @yankiara.

We’ll do the necessary to get this addressed as soon as possible.

1 Like