Add max-width to headings/paragraph
-
yes i have already used
"layout": {
"contentSize": "1160px",
"wideSize": "1400px"
},Odd thing is that in the editor.. a paragraph not in a group row seems to be using “”contentSize”: “1160px”,. But on the front end it is full width?
in order to get headings/paragraphs to use that layout in the front-end I must wrap them in a ‘group row’ (is that right?)
But that is a bit of a drag for the editor and I want all headings/paragraphs to have a max-width
I’ve tried this, but doesn’t seem to work"styles": { "typography": { "elements": { "heading": { "typography": { "fontWeight": "700", "lineHeight": "1.1" }, "css": "maxWidth: 1160px; margin: 0 auto;" },
Also tired
"blocks": {
"core/heading": {
"css": "maxWidth: 1160px; margin: 0 auto;"
},
"core/paragraph": {
"css": "maxWidth: 1160px; margin: 0 auto;"
}
}
but that does work eitherthis custom css works
.b-h2 {max-width: 1160px;margin: 0 auto;}
but I’d prefer to do it in theme.json
ps. more layout weirdness.. in the editor the cover block is not full width in the editor… but on the front-end it is
- The topic ‘Add max-width to headings/paragraph’ is closed to new replies.