Skip to content

Administration: Vertically center the Collapse Menu label regardless of the font. - #16225

Draft
SainathPoojary wants to merge 1 commit into
WordPress:trunkfrom
SainathPoojary:fix/66814-collapse-menu-label-alignment
Draft

SainathPoojary wants to merge 1 commit into
WordPress:trunkfrom
SainathPoojary:fix/66814-collapse-menu-label-alignment

Conversation

@SainathPoojary

@SainathPoojary SainathPoojary commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

The "Collapse Menu" label was not lined up with the other admin menu items. How far off it was depended on the font. It was easy to see in Japanese, mostly on Windows.

Cause: the label used position: absolute; top: 8px with no line-height, so it took line-height: normal from the button. That value comes from the font, so some fonts pushed the text down. The absolute positioning was only there for old IE, which is no longer supported.

This PR:

  • Removes the absolute positioning and centers the icon and label with flexbox.
  • Gives the label line-height: 1.3 and 8px vertical padding, the same as the other menu items.
  • Changes the button's height: 34px to min-height: 34px, so long translations that wrap don't overflow.

Trac ticket: https://core.trac.wordpress.org/ticket/66814

macOS Before

66814-locales-before

macOS After

66814-locales-after

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Claude Code helped with the code changes. Review and testing the changes was done by me


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant