-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Navigation Block: fix inconsistent padding in nested submenus when "Open on click" is enabled #70471
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
Navigation Block: fix inconsistent padding in nested submenus when "Open on click" is enabled #70471
Conversation
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
cce9bfe
to
eeeb828
Compare
eeeb828
to
9e74a3a
Compare
As far as I can tell, this doesn't introduce regression for #50943, which introduced the padding reset. cc @jasmussen |
It's a bit far back in my memory, so I can't comment on the details off the top of my head, but at a glance it looks valid enough. I wonder if @carolinan has thoughts? |
What?
Closes #70463
The left padding for nested submenu items in the navigation block is inconsistent when "Open on click" option is enabled for the navigation block. This PR fixes padding-left for the same.
Why?
As reported in #70463, nested submenu toggle buttons inherit conflicting padding styles when “Open on click” is used. The base class
.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle
applies a left padding of0
, which removes the indentation for nested levels. This results in visual inconsistency compared to when “Open on click” is disabled.This commit restores appropriate left padding to maintain appropriate indentation for submenu items.
How?
Restored padding by targeting submenu items within the .wp-block-navigation__submenu-container ensuring minimal specificity interference.
Testing Instructions
Screenshots or screencast
Before
After