Opened 2 years ago
Last modified 2 years ago
#56497 assigned defect (bug)
Categories (List) block center alignment is not working with dropdown in editor
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.0.1 |
Component: | Editor | Keywords: | close |
Focuses: | css | Cc: |
Description (last modified by )
Categories block center alignment setting is not reflecting on editor side.
- Activate the Twenty Eleven Theme
- Add Categories Block (or "Categories List" block if Gutenberg plugin is activated)
- Select the "Display as dropdown" option in the sidebar
- Change the alignment to center
Here is Screen Recording:https://share.cleanshot.com/CDO3nlFrsNj3r6TpLJH5
Attachments (1)
Change History (3)
#1
@
2 years ago
- Description modified (diff)
- Focuses css added
- Keywords close added
- Summary changed from Twenty Eleven: Categories block center alignment is not reflecting on editor side to Categories (List) block center alignment is not working with dropdown in editor
Thanks for the report!
I do not recommend trying to fix the block alignment in individual themes' editor styles. Twenty Twenty-One is the only bundled theme I found that centers the Categories List block's dropdown in the editor, so this would be better to report on GitHub.
Note: the plugin has renamed this block "Categories List" in GB39837. (This might confuse people who have been using the "Categories" block since WordPress 5.8, but that's a separate issue.)
A new Trac ticket could address the front-end margin with the dropdown option of Archives and Categories List blocks. Twenty Ten, Twenty Eleven and Twenty Fourteen have a left margin for the list markup that pushes the dropdown (and its label) slightly off-center. Adding this worked for me in each of the blocks.css files:
.wp-block-archives-dropdown.aligncenter, .wp-block-categories-dropdown.aligncenter, .rtl .wp-block-archives-dropdown.aligncenter, .rtl .wp-block-categories-dropdown.aligncenter { margin-left: 0; margin-right: 0; }
added patch