-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
contentSize in theme.json is applied differently in the editor and in the frontend #42290
Comments
To clarify, are you saying that headings are aligned to the right when ch is used? I am not sure what "this happens" means, there is also a text size difference between the two images? |
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks. |
When ch units are used for the content width, the site editor doesn't interpret this correctly and as a result short lines end up being aligned to the right. |
Is this in any way related to ch not being added to settings.spacing.units? |
Hi, |
So what I think they are expecting to happen is that the contentSize be applied to the content area as a wrapper rather than on each individual block. This is an issue when using the ch unit as it's relative to the font size set on each block. So the headings progressively get larger widths which causes the layout to look broken. Ideal the contentSize when using a unit like ch would be relative to the base font size. |
Description
When ch units are used for the content width, the site editor doesn't interpret this correctly and as a result short lines end up being aligned to the right:
This happens in the editor:
While this happens on the frontend:
Note this issue is not so apparent when pixels are used because there is no visual difference between the class name applied to the wrapper and the children elements.
What do I expect to happen?
I'd like the editor to do the same thing as frontend – do not apply the
max-width: 76ch
to the heading blocks, just to the wrapper.cc @scruffian @WordPress/block-themers
The text was updated successfully, but these errors were encountered: