Make WordPress Core

Opened 3 years ago

Closed 12 days ago

#56497 closed defect (bug) (invalid)

Categories (List) block center alignment is not working with dropdown in editor

Reported by: multidots1896's profile multidots1896 Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.0.1
Component: Editor Keywords: close
Focuses: css Cc:

Description (last modified by sabernhardt)

Categories block center alignment setting is not reflecting on editor side.

  1. Activate the Twenty Eleven Theme
  2. Add Categories Block (or "Categories List" block if Gutenberg plugin is activated)
  3. Select the "Display as dropdown" option in the sidebar
  4. Change the alignment to center

Here is Screen Recording:https://share.cleanshot.com/CDO3nlFrsNj3r6TpLJH5

Attachments (1)

56497.patch (439 bytes) - added by multidots1896 3 years ago.
added patch

Download all attachments as: .zip

Change History (4)

@multidots1896
3 years ago

added patch

#1 @sabernhardt
3 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;
}

#2 @sabernhardt
3 years ago

Thanks for opening a Gutenberg issue! GB43982

#3 @karmatosed
12 days ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from assigned to closed

As this now has an issue opened, let's close this one here, thank you everyone for your collaboration.

Note: See TracTickets for help on using tickets.