-
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
Post title: remove class from old div to fix alignment #34489
Conversation
Size Change: +627 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
This helps, thanks @ellatrix! It does look like some of the styles (specifically in Twenty Twenty, I haven't tested other themes yet) are still missing their targets. In the case of Twenty Twenty this impacts the size of the title and the alignment. While this PR currently centers the title element in the editor, the text within the element is still left aligned. Three screenshots for comparison: When comparing the first and last screenshots, it looks like the text is still smaller and not centered as it was pre-11.4 |
That's because the theme styling is no longer applying. What you see is the same as a h1 element. If you insert a post title block, you'll see that the styling is the same for that block. Eventually the post title will be replaced with a post title block. I think the small change in style is fine. There's no breakage and themes can adjust the selectors if they wish. |
@ellatrix Am I correct assuming those are then expected style changes in v11.4+ and that theme developers should be already aware of them and will fix them soon? |
There's also this z-index (?) glitch that @talldan reported: #34479 (comment), though it appears to be an older bug. |
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.
Thanks for the quick fix, Ella! I'm accepting this knowing that there might be other adjustments we might need to do as follow ups, and being aware that theme folks also need to either patch themes or wait for the Post Title
block.
They are not aware, so maybe we should do a dev note when the WP release comes. To me it's no big deal since the title is still styled as heading level 1, and themes can choose to modify the styling if they wish. |
Added the dev note label. Dev not should be something like: A div wrapper element around the post title in the post editor has been removed to align it better with the post title block. Some theme styles targeting the post title (that include the removed div's class name) may no longer apply. Please use the |
Description
Fixes #34479.
A div was removed in #34167. Instead of moving the class name to another div, we should just remove it as well. Also adds
block-editor-block-list__block
so some theme styles apply properly.Note that the post title refactors prepare it for switching over to the post title block eventually.
How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).