-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix center alignment on the dropdown in the categories block #44013
Conversation
I saw this PR this morning #44004. I trust your judgment on the preferred method to resolve the issue. |
I forgot that there was work being done to the markup and class names in #43666, marking as blocked for now. |
Size Change: +139 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
The changes to editor.scss are no longer needed.
@theminaldiwan I see it now, |
@theminaldiwan I'm sorry it took me so long to get back to this. I would appreciate your help with testing the PR with a classic theme and a block theme. Also, I am not sure what the expected design is for the center when the block uses a list. In block themes, the bullets and text are not centered like they are in the Twenty Eleven. |
Flaky tests detected in 156afef. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4121198041
|
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.
This looks good to me.
It fixes the issue we currently have, where center-aligning this doesn't work.
Different themes can apply different behaviours if they wish to do so, but I think we should have the option working in Core - which this PR does.
What?
Add
text-align:center
to the block CSS so that the block can be centered when the "Display as dropdown" option is used.Fixes #43982
Why?
The center alignment was not working in the editor or the front.
How?
The markup in the editor and front is different, so CSS needed to be added to both style.scss and editor.scss.
The text alignment is limited to when the dropdown option is used, because otherwise, the text inside the list items would be centered, but not the list bullets.
Testing Instructions
Screenshots or screencast