-
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
Don't add Post Content layout styles to title in the post editor. #48663
Conversation
Size Change: -6 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
Flaky tests detected in 22679c5. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4310804362
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @tellthemachines, glad to see it was a simple fix to ensure that the post content block layout rules don't affect the post title block in the post editor 👍
This is testing well for me across a variety of blocks and classic themes.
One thing I noticed in testing that isn't related to this PR, is that while running emptytheme
there's no spacing between the post title block and the first block of the post content.
I believe this is because we don't have layout running on the parent of both areas of the document (since the parent is body
currently). I wonder if it'd be worth at some point seeing if we can add layout one level up, so that we can apply default spacing between the title and the post content area? (I see themes like TT3 deal with this by including margin rules for the post content block as part of the theme). Definitely not a blocker for this PR, though!
LGTM! ✨
Thanks for reviewing @andrewserong! |
I just cherry-picked this PR to the wp/6.2 branch to get it included in the next release: 83ddde7 |
What?
Fixes #48579.
If Post Content block has custom layout settings (e.g. if it's justified right and/or has a narrow content width) the post title in the post editor shouldn't get those styles, as they don't necessarily reflect the layout of the Post Title block in the template.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast