Here’s how you can convert your inquiry into a Stack Overflow question:
I have the following configuration in my theme.json
file:
"settings": {
"layout": {
"contentSize": "650px",
"wideSize": "800px"
}
}
My question is: Does this layout setting apply exclusively to the Gutenberg editor, or does it also affect the client-side frontend of the site?
Here’s how you can convert your inquiry into a Stack Overflow question:
I have the following configuration in my theme.json
file:
"settings": {
"layout": {
"contentSize": "650px",
"wideSize": "800px"
}
}
My question is: Does this layout setting apply exclusively to the Gutenberg editor, or does it also affect the client-side frontend of the site?
Share Improve this question asked Apr 14 at 12:29 WordCentWordCent 1,9646 gold badges34 silver badges60 bronze badges1 Answer
Reset to default 3Yes, it affects the front end.
In a properly written block or hybrid theme it sets the maximum width of any content inside a block that has the constrained
layout. The most obvious example of this is the Group or Content blocks when Inner blocks use content width is enabled. The wide size is the size used when one of those inner blocks has its alignment set to Wide.
WordPress will output this CSS in a <style>
tag to apply the size:
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
max-width: var(--wp--style--global--content-size);
margin-left: auto !important;
margin-right: auto !important;
}