Repository navigation
Description
What problem does this address?
I had a hard time searching for this, so apologies if I missed an existing issue for it.
I’ve been thinking about FSE themes and container widths – specifically, the width of blocks when the screen is thinner than the max-width set by settings.layout.contentSize and settings.layout.wideSize. By default, if you resize your screen to be thinner than these values, the blocks simply extend all the way to the edge of the screen, like this:
That means that themes need to include CSS to set a gutter between blocks and the edges of the screen when the screen is thinner than settings.layout.contentSize or settings.layout.wideSize.
Almost every FSE theme I’ve looked at seems to approach this a bit differently. These are the solutions I’ve seen:
- Setting a horizontal padding on containers, and a negative horizontal margin on alignfull elements and nested containers. This approach seems to break when nested containers are set to horizontal auto margins by the Core
.wp-container-XXXstyles. (Blockbase) - Setting a horizontal padding on non-alignfull elements beneath a certain screen width threshold. (Armando)
- Requiring elements to be wrapped in certain container blocks (like alignfull groups, or groups with specific custom classes) for them to have horizontal spacing beneath the
max-width, and setting a horizontal padding on.wp-block-post-contentand other specific elements. (Aino, Clove) - Not including any CSS for it, resulting in the blocks extending to the edge of the screen when the screen is thinner than the
max-width. (TT1 Blocks, the screenshot above)
What is your proposed solution?
This seems like something that should be handled in theme.json by adding something like settings.layout.minimumWidth. When set (to, say, calc( 100% - 32px ), Core makes sure that the .wp-container-XXX inline style sets that as the width on the right blocks in the container, so those blocks have that width (with a gutter of 16px in this case) below settings.layout.contentSize and settings.layout.wideSize.
If isn’t handled by Core, every theme rolling their own solution to it seems like something that can lead to large layout issues when users switch between themes (esp. if some themes rely on custom class names) or when the markup structure in Core changes and the CSS targeting in themes break.

Activity
ntsekouras commentedon Sep 21, 2026
This was covered by root padding:
styles.spacing.paddingat the root (#35241) together withsettings.useRootPaddingAwareAlignments(#42085) gives the gutter below the content width without theme CSS, and it's what the default themes use now. So I'm closing this one. Feel free to reopen if I'm missing something.